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 > SQL to Informix conversion

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-14-11, 14:37
jwalt037 jwalt037 is offline
Registered User
 
Join Date: Apr 2011
Posts: 1
SQL to Informix conversion

Hello, I have the following functional SQL statement that I need converted over to Informix syntax.. thanks for the help!

select ar_invoice_nbr from ar_item where ar_invoice_nbr in (select ih_nbr from si_invoice where ih_date > dateadd(year, -2,getdate()))

All this is doing is selecting invoice line items from invoices over the past 2 years.
Reply With Quote
  #2 (permalink)  
Old 04-15-11, 07:28
philrule philrule is offline
Registered User
 
Join Date: Apr 2011
Posts: 5
Try this -

where ih_date > (current - 2 units year)
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