Sorgudaki yapılandırma tablosundaki değerleri alma Bir yapılandırma tablosundaki değerleri alan bir SQL Server 2012 sorgusu oluşturmam gerekiyor. Kod şöyle görünür:Değer
Product
product_types product_description
001 Milk
002 Butter
003 Oatmeal
Configuration_table
product_nr
001
003
Sorgu:
SELECT *
FROM product
WHERE product.types in (select product_nr from configuration_table)
Sadece 001 ve 003 gösterilmelidir. Ancak bu sorguda sonuç yok. Bu nasıl düzeltilebilir?
Cevabınız için teşekkürler!
Veri tipleri product.types ve Configuration_table.product_nr için? – jarlh
Merhaba jarlh cevabınız için teşekkürler. product_types ve product_nr nvarchar veri türleridir – mgo
Bunun yerine tamsayı kullanmış olurdum. – jarlh