Qiuck one?

Results 1 to 2 of 2

Thread: Qiuck one?

  1. #1
    Join Date
    Dec 1969

    Default Qiuck one?

    It might be a stupid q? but i want to be able to pull infos from the database where the date is less than six days(past 6days) and the infos where date is less than 1 month(past month). But i have no idea how to do that.<BR>I was thinking of using datediff but i don&#039t know how to use it, and i really suck at SQL,<BR>Thank you in advance<BR>ashraf@iqnest.com

  2. #2
    Somnath Dhar Guest

    Default RE: Qiuck one?

    Here is the examples. Hope these will help you.<BR><BR>1. SELECT DRUG_NAME,STRENGTH FROM T_RX WHERE DATEDIFF( <BR> MM,RX_DATE,GETDATE()) &#060;= 1<BR><BR>2. 1. SELECT DRUG_NAME,STRENGTH FROM T_RX WHERE DATEDIFF( <BR> DD,RX_DATE,GETDATE()) &#060;= 6<BR><BR><BR>somnath@esspl.com<BR><BR>Happy programming!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts