Results 1 to 4 of 4

Thread: Query Problem [RESOLVED]

Threaded View

  1. #1

    Thread Starter
    Addicted Member Paradox's Avatar
    Join Date
    Sep 2004
    Location
    Nairobi
    Posts
    189

    Resolved Query Problem [RESOLVED]

    Hi, I am trying to execute th query below but keep getting the error below on MSSQL 2000. any ideas where i could be going wrong.

    Code:
    Select pb.name as name,
    pb.cellnumber as cellnumber, pb.recordindex as pbindex,
    pb.emailaddress as emailaddress,
    gm.recordindex as groupindex,
    gm.groupindex as gi
    if gm.allowedbroadcast = 1,'Yes','No' as priv
    if(gm.groupindex,'Member','Not Member') as ismember,
    if(gm.allowedbroadcast = 1,'Privileged' ,'Normal') as Broadcast
    FROM
    groupmembers as gm LEFT
    JOIN
    phonebook as pb on (pb.recordindex = gm.phonebookindex)
    WHERE
    groupindex=34 order by gm.allowedbroadcast desc,
    pb.name asc, pb.cellnumber asc
    I get the error below

    Line 6: Incorrect syntax near ','.
    Line 7: Incorrect syntax near ','.
    Line 8: Incorrect syntax near ','.
    (0.300 sec)

    Any help will be greatly appreciated.
    Last edited by Paradox; Jul 30th, 2007 at 06:12 AM.

Posting Permissions

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



Click Here to Expand Forum to Full Width