SQL within Excel question

Chris Davison

MrExcel MVP
Joined
Feb 15, 2002
Messages
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
:)
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
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
 
Upvote 0
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
 
Upvote 0
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]

:)
 
Upvote 0

Forum statistics

Threads
1,213,565
Messages
6,114,338
Members
448,570
Latest member
rik81h

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top