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 > convert informix specific sql query to MS SQL Server

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-25-10, 07:06
smak smak is offline
Registered User
 
Join Date: Nov 2010
Posts: 1
convert informix specific sql query to MS SQL Server

Hi All,

I have a sql query specific to informix and syntactically not valid in MS SQL Server.

The sql query is,

select supplier,dated,item,type,reference,local_amount from payments p
where p.supplier=:supplier order by dated

I need you help to convert that sql query to MS SQL Server understandable query.

Thanks
Reply With Quote
  #2 (permalink)  
Old 11-26-10, 07:57
PhilSchmidt PhilSchmidt is offline
Registered User
 
Join Date: Apr 2010
Posts: 5
Quote:
Originally Posted by smak View Post
Hi All,

I have a sql query specific to informix and syntactically not valid in MS SQL Server.

The sql query is,

select supplier,dated,item,type,reference,local_amount from payments p
where p.supplier=:supplier order by dated

I need you help to convert that sql query to MS SQL Server understandable query.

Thanks
The syntax looks fine for MS SQL except for the :supplier part. I'm going to guess that your code is somehow substituting a valid value in place of the :supplier placeholder. Otherwise the query makes no sense at all even in INFORMIX. So assuming that p.supplier is an integer, then a valid syntax would be . . .

select
supplier,
dated,
item,
[type],
reference,
local_amount
from
payments p
where
p.supplier = 2468
order by
dated
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