![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Millbank, London, UK
Posts: 1,790
|
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 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
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 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Millbank, London, UK
Posts: 1,790
|
oh fab...thanks Mark....once again, I owe you !
(does the "in" mean "inclusive" ?) |
|
|
|
|
|
#4 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
Quote:
[ This Message was edited by: Mark W. on 2002-03-20 13:36 ] |
|
|
|
|
|
|
#5 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Millbank, London, UK
Posts: 1,790
|
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] |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|