Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2010
    Posts
    1

    Unanswered: 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

  2. #2
    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

Posting Permissions

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