SQL within Excel question
SQL within Excel question
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

Thread: SQL within Excel question

  1. #1
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Millbank, London, UK
    Posts
    1,790
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    Evening all,

    this is an SQL question, it's just I'm typing it in an Excel addin that connects to an Oracle database....

    cell A1 contains :

    SELECT * from acbbankrec WHERE client='TG' AND status ='N'

    I want it to bring back info from ALL my clients (TG, PR, FT, FO and TR).... what's the SQL syntax for this ?

    sorry, I know this isn't 100% an excel question, but my co-workers can't help and the SQL downloads into Excel and thus my life makes sense again...

    many thanks
    Chris



  2. #2
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Austin, Texas USA
    Posts
    11,654
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    SELECT * from acbbankrec WHERE client In('TG','PR','FT','FO','TR') AND status ='N'


    [ This Message was edited by: Mark W. on 2002-03-20 13:31 ]

  3. #3
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Millbank, London, UK
    Posts
    1,790
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    oh fab...thanks Mark....once again, I owe you !


    (does the "in" mean "inclusive" ?)

  4. #4
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Austin, Texas USA
    Posts
    11,654
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-03-20 13:33, Chris Davison wrote:
    oh fab...thanks Mark....once again, I owe you !

    (does the "in" mean "inclusive" ?)
    No, it means "in this list". Or, if you prefer "among these..."

    [ This Message was edited by: Mark W. on 2002-03-20 13:36 ]

  5. #5
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Millbank, London, UK
    Posts
    1,790
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    ta


    [completing this SQL cuts out about 4 hours of copy/pasting into Excel and thus cuts down a regular Monday afternoon duty from 6 hours to about 1 hour start to finish]


User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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

 

 
DMCA.com