Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2012 Forums
 Transact-SQL (2012)
 Nested Selected statement, returns empty

Author  Topic 

jackie11
Starting Member

3 Posts

Posted - 2015-04-01 : 12:15:47
Hi there I have the following SQL query:

SELECT Product_ID FROM PackageProduct WHERE Package_ID = (Select Package_ID FROM Package where Cust = '" joebloggs "')


joebloggs has a package in my database, and that package has products saved in the PackageProduct table sharing the same Package_ID value, but my query when run in Access seems to work fine but the returned column(Product_ID) is empty.

Please could someone help.

Many thanks

jackie11
Starting Member

3 Posts

Posted - 2015-04-01 : 12:17:33
I solved it, sorry it was the double quotes in the way :)
Go to Top of Page
   

- Advertisement -