Linker IT Software
menubar-top-links menubar-top-rechts
Home Help Search Login
Welcome, Guest. Please Login.
SQL*XL: Database to Excel bridge litLIB: Excel power functions pack ExcelLock: Locking and securing your valuable Excel spreadsheets encOffice: Protect your Excel file easy and safe encOffice: Protect your Excel file easy and safe
Pages: 1
Using text SQL parameters (Read 3786 times)
Gerrit-Jan Linker
YaBB Administrator

Posts: 75
Using text SQL parameters
31.08.11 at 11:53:58
Using text SQL parameters

This function works when the cell O1 contains a numeric value but not a varchar value:
=SQLQueryValue("select strc_code from defactouser.F_ST_PRODUCTS where strc_code =" & O1)

The text parameter needs to be qualified with single quotes normally but I can't figure out the syntax with your function.

Oh, but that is not too difficult:
"... where col= '" & A1 & "'"
So you concatenate 3 strings. The first you end with single quote and
then double quote to terminate the string.  
Then the value A1and next a single quote embedded in double quotes.  
Related topics:
There are other options too. See:
Back to top
« Last Edit: 31.08.11 at 11:55:31 by Gerrit-Jan Linker »  

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Pages: 1