extract details from inner query
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: extract details from inner query

  1. #1
    Join Date
    Feb 2009

    Question 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?

  2. #2
    Join Date
    Mar 2007
    Ft. Lauderdale, FL
    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 07: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

Click Here to Expand Forum to Full Width