Hi,
I have a few questions around the SQL request method:
I have cell with list validation - call G3. The list is called instance and contains 40 values like UK1, UK2,NA1,FR1,NA1 etc ( these are all SUN_DB's - see below)
I have a named range called ACCOUNTS which has two fields which I am using in a VLOOKUP
1) A concatenated field: SUN_DB & ACCNT_NAME
2) ACCNT-NAME
The contents of ACCOUNTS needs to relect the users choice in cell G3. I need that cell choice to trigger an appropriate SQL.Request query. The query text of which will always be the same - looks like that below - I just need to modify so that it returns the only the concatenated field and the ACCNT_NAME
SELECT SSRFACC.SUN_DB, SSRFACC.ACCNT_CODE, SSRFACC.ACCNT_NAME, SSRFACC.SUSPEND
FROM SSRFACC
WHERE (((SSRFACC.ACCNT_CODE) Not Like "6%") AND ((SSRFACC.SUSPEND) Not Like "C"));
However there are x number of Connection_Strings:
DSN=EURSUN101.CAMSUN;UID=V
iewer;PWD=
Rodeo;Data
base=CAMSU
N - will return an ACCOUNTS table for all SUN_DB's beginning UK and IE
DSN=EURSUN101.FRASUN;UID=V
iewer;PWD=
Rodeo;Data
base=CAMSU
N - will return an ACCOUNTS table for all SUN_DB's beginning DE and CZ
DSN=USASUN101.USASUN;UID=V
iewer;PWD=
Rodeo;Data
base=CAMSU
N - will return an ACCOUNTS table for all SUN_DB's beginning US
Whats the best way of making this work - it needs to be fairly robust because there will be quite a few users all of whom will have the data sources named in the same way as I do above - they are al system data sources.
Specific Question:
I have the following formula in cell B12 - can anybody tell me why when I press enter all I get as the result is the column heading SUN_DB in cell B12 - why doesn't it show all the results.
SQL.REQUEST("DSN=EURSUN101
.CAMSUN;UI
D=Viewer;P
WD=Rodeo;D
atabase=CA
MSUN",B16:
C88,2,"SEL
ECT SSRFACC.SUN_DB,SSRFACC.ACC
NT_CODE FROM SSRFACC",TRUE)
http://www.experts-exchange.com/Applications/MS_Office/Excel/Q_21133627.html