LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (January 2004, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 23 Jan 2004 11:58:49 -0000
Reply-To:   Steven_McAleavy@BANKOFSCOTLAND.CO.UK
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Steven McAleavy <Steven_McAleavy@BANKOFSCOTLAND.CO.UK>
Subject:   Re: DB2 date and SAS date
Content-Type:   text/plain; charset=iso-8859-1

As I understand it you are wanting all the date rows from table a that are the same as all the date rows from table b + 2 months.

You could use the following for DB2:

((month(b.date2) >= 1 and month(b.date2) <= 10 and month(a.date1) = month(b.date2 + 2 months) and year(a.date1) = year(b.date2)) or (month(b.date2) >= 11 and month(b.date2) <= 12 and month(a.date1) = month(b.date2 + 2 months) and year(a.date1) = year(b.date2 + 1 years)))

Cheers, Steve.

> Steven McAleavy > Technical Manager, CRM > * DDI: 01383 426802 > * Fax: 01383 426779 > * E-mail: steven_mcaleavy@bankofscotland.co.uk > * Address: Dundas House, Viking Way, Rosyth Europarc, Rosyth, Fife KY11 2UU >

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU]On Behalf Of Chandu Sent: Thursday,22 January,2004 20:25 To: SAS-L@LISTSERV.UGA.EDU Subject: DB2 date and SAS date

Hi Group,

I am comparing two dates from different tables both are in DB2.But I am using sas function on one date. EX:

a.date1=intnx('month',b.date,2,'end')

but this is not working.I am doing this in pass through sql in db2.Can anyone suggest me a way to do this.

Thanks in advance Raju

--

------------------------------------------------------------------------------ The information contained in this message is confidential and is intended for the addressee only. If you have received this message in error or there are any problems please notify the originator immediately. The unauthorised use, disclosure, copying or alteration of this message is strictly forbidden. This mail and any attachments have been scanned for viruses prior to leaving the HBOS network. HBOS will not be liable for direct, special, indirect or consequential damages arising from alteration of the contents of this message by a third party or as a result of any virus being passed on.

HBOS reserves the right to monitor and record e-mail messages sent to and from this address for the purposes of investigating or detecting any unauthorised use of its system and ensuring its effective operation.

HBOS plc, Registered in Scotland No. SC218813. Registered Office: The Mound, Edinburgh EH1 1YZ. HBOS plc is a holding company, subsidiaries of which are regulated by the Financial Services Authority. =============================================================================


Back to: Top of message | Previous page | Main SAS-L page