Results 1 to 3 of 3

Thread: Query Help

  1. #1

    Thread Starter
    Addicted Member hyousuf2's Avatar
    Join Date
    Dec 2004
    Location
    Dublin
    Posts
    226

    Query Help

    well it may not be the rigth forum but pls help
    i need to run a query in SQL server like this
    select * from tblPayments where clientid = (select clientid from tblUsers where gfaxcrm = 'Yes')
    it says that a subquery can return more than one result.what should i do
    Women ...r like tea bags, you neva know how strong they really r untill u put them in hot water

    Huzefa Yousuf
    Software Engineer
    Verticity Inc.
    +92-345-2235303

    [email protected]

  2. #2
    Fanatic Member Blade's Avatar
    Join Date
    Jan 1999
    Location
    Stoke-on-Trent, UK
    Posts
    527

    Re: Query Help

    Simplest way is to do this:

    Code:
    select * from tblPayments where clientid IN (select clientid from tblUsers where gfaxcrm = 'Yes')
    Might not be the most efficient, depends on your db design, but it will work.

  3. #3

    Thread Starter
    Addicted Member hyousuf2's Avatar
    Join Date
    Dec 2004
    Location
    Dublin
    Posts
    226

    Re: Query Help

    thnkx dat did it
    Women ...r like tea bags, you neva know how strong they really r untill u put them in hot water

    Huzefa Yousuf
    Software Engineer
    Verticity Inc.
    +92-345-2235303

    [email protected]

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