dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: sql querying

  1. #1
    Join Date
    Apr 2006
    Posts
    587

    sql querying

    I've got this query here which just gives me a list of client id's where the SEDOL_CODE isn't null.
    Code:
    SELECT CLIENT_ID FROM PF_VALN_DETAILS WHERE SEDOL_CODE IS NOT NULL
    But I want to extend the query to check the SEDOL_CODE in another table, where the nominal value is 0..

    Code:
    SELECT SEDOL_CODE FROM PF_STOCKS WHERE NOMINAL_VALUE = '0'
    so how can I combine the 2 queries?

  2. #2
    Join Date
    May 2009
    Location
    Lincs, UK
    Posts
    298

    Re: sql querying

    Code:
    SELECT client_id FROM pf_valn_details WHERE sedol_code IN (SELECT sedol_code FROM pf_stocks WHERE nominal_value = '0')

  3. #3
    Join Date
    Apr 2006
    Posts
    587

    Re: sql querying

    Thanks.

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)