-
extract details from inner query
Hi experts,
I wrote one query,
select st.visittime,st.userid,st.emailcode from alamyStatistics..st_emailTracking st join alamyOrders..op_order op on op.userid=st.userid where op.datepurchased between visittime and dateadd(dd,30,visittime)
is the details of users who are in both st_emailtracking & op_order and their datepurchased between 30days from their visittime. Here i will get one table,
Next from this table, i have to extract the visittime,userid,emailcode where datepurchased between '01-02-08' and '01-03-08'.
How to apply> can anyone help this one?
-
Is that Transact-SQL?
You may get faster more accurate help on SQL Server issues here... http://www.sqlservercentral.com/Foru....aspx?Update=1
Last edited by PAVB; 02-24-2009 at 08:38 AM.
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|