use a sql select statement to get parameters for 2nd select statement
Posted
by diver-d
on Stack Overflow
See other posts from Stack Overflow
or by diver-d
Published on 2010-05-01T22:40:16Z
Indexed on
2010/05/01
22:47 UTC
Read the original article
Hit count: 198
sql-server
|sql
Hi there, I am trying to write a sql statement that
I have 2 tables Store & StoreTransactions. My first select command looks like
SELECT [StoreID],[ParentStoreID]
FROM Store
Very simple stuff. How do I take the returned StoreID's and use them for my 2nd select statement?
SELECT [StoreTransactionID],[TransactionDate],[StoreID]
FROM StoreTransactions
WHERE StoreID = returned values from the above query
Any help would be great!
© Stack Overflow or respective owner