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
Use substitution variables in a string (Read 2628 times)
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
Use substitution variables in a string
29.12.06 at 12:48:43
 
Use substitution variables in a string
 
SQL*XL user Wilhelm from Germany asked the following question:
 
Question:
When I run the following query I do not get any results:
select * from mytable where mycol like '&parameter%';
 
Answer:
Parameters in strings did not work properly. I have put a fix in for this. It will be released as SQL*XL 4.0.6.
The query you mention now works properly.
 
It raises an interesting question. Suppose you want to query an &:
[tt]select 'a&b' from dual

a&b
 
When you run the above query SQL*XL will see the &b as a variable and it will ask you for a value. If you just want to return the a&b you need to escape the & symbol:
set escape on;
select 'a\&b' from dual;
 
 
References:
SQL*XL home page: www.oraxcel.com/projects/sqlxl
Set command: www.oraxcel.com/projects/sqlxl/help/commands/set.html
Back to top
 
« Last Edit: 29.12.06 at 12:53:18 by Gerrit-Jan Linker »  

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