Linker IT Software
Google
Web www.oraxcel.com
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 2820 times)
Gerrit-Jan Linker
YaBB Administrator
*****




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

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:
http://www.oraxcel.com/projects/sqlxl/help/techniques/parameters.html  
http://www.oraxcel.com/projects/sqlxl/help/commands/define.html  
http://www.oraxcel.com/projects/sqlxl/help/commands/accept.html  
http://www.oraxcel.com/projects/sqlxl/help/dialogs/parameters/index.html  
http://www.oraxcel.com/cgi-bin/yabb2/YaBB.pl?num=1149170343
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