If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > previous dates in informix xps

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-12-03, 14:12
vmac vmac is offline
Registered User
 
Join Date: Dec 2003
Posts: 1
previous dates in informix xps

looking to create a transaction date referring to previous dates from fact table in xps...


DECLARE @vDate smalldatetime
SELECT @vDate = getdate()

SELECT 'Previous Date' = DATEADD(DD,(SELECT CASE DATEPART(DD,@vDate) WHEN 2 THEN -3 WHEN 1 THEN -2 ELSE -1 END),@vDate)

using this in a relational tool w/out direct access to db....works well enough....taking too long to return results....no indexing in xps.....any thoughts????
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On