SQL Server T-SQL not returning results with no error - this should work right? -


I'm trying to find something that does not match in 2 tables, it should be easy, now it works fine Does.

  Select Shop_Import SI From where Shop_Import_Cats not in (SELECT productref SI.productID)  

But this SQL I need to use, but it only the first result will not return, which is above:

  SELECT 'Shop_Import_Cats insert values ​​(' + CAST (p. productive as VARCHAR) + ', + CAST (c. + ',' + cast (SI.ProductID as VARCHAR) + ', getdate ()) Join the NB_Store_Products P NB_Store_ProductLang pl on p.ProductID = pl.ProductID Shop_Import SI Join the p.ProductRef = SI.ProductID included Get NB_Store_CategoryL Based ang CL on SI .Primary_Category = CL.CategoryName NB_Store_Categories include C match on CL.CategoryID = C.CategoryID Shop_Import_Cats select Join SIC on SI.ProductID = SIC.productref where not SI.ProductID (SIC.productre advice But I tried to host hosting here and left no one to take advantage - it is empty, but a result should be returned.  
  'code' ('varchar' In c.CategoryID + ''), 'cast (SI). SI joining productive as varchar) + ', getdate ()) left Shop_Import SI from joining SI.ProductID = p.ProductRef p.ProductID left = pl.ProductID NB_Store_ProductLang pl in NB_Store_Products p. Primary_Category = CL.CategoryName NB_Store_Categories on the left CL Joining the C left to join the NB_Store_CategoryLang cl. CategoryID = C.CategoryID Left select SIC.productref not (Shop_Import_Cats SIC where joining Shop_Import_Cats SIC on SI.ProductID = SIC.productref) SI.ProductID  

What Am i wrong?

Try it instead:

 Add  SELECT '. Nto Shop_Import_Cats value ( '+ Siasti (Piapeediadiaidi,' 'aS Viaaraaraar) as) +', '+ Siasti (c. Karebritiaidi') as Viaacaaraar) + ',' + Siasti (Colas (SI ProductID, '') to choose from as VARCHAR) + ', getdate ()) (ProductID, Primary_Category / * any additional required columnx here SIC not SI.ProductID (select Shop_Import_Cats SIC where insert * / Shop_Import SI. Productref)) SI p. ProductID = pl.ProductID left to be left abandoned SI.Primary_Category SI.ProductID = on = join NB_Store_CategoryLang CL on CL.CategoryName p.ProductRef include NB_Store_Products P joining NB_Store_ProductLang pl CL.CategoryID = C lEFT to join NB_Store_Categories C .CategoryID include Shop_Import_Cats SIC on SI.ProductID = SIC.productref which  

now the situation is moving in the same relvar As in the example of work, I suspect that a zero value is 3 valuable The offer is doing and is promoting UNKNOWN in an unknown record set.

** Required to add SI to 'Shop_Import' from editing


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -