-
Hi Folks,
I'm using 8.1.6 on AIX.
I'm trying to decode a value that contains a '&' and replace it with another field (See below). However when I run the statement it prompts me for a value for Gen. It thinks the '&' is for user input. Does anybody know how to accept the 'Bill & Ben' and not to prompt for an input for Ben????
(decode(avc_element_1,
'Bill & Ben ', ytd_avc_ded_cash_1, 0))
thanks for any help
Moff.
-
If SQL*Plus
If you are running under SQL*Plus you can use the set escape
command, such as:
set escape \
select (decode(avc_element_1,
'Bill \& Ben ', ytd_avc_ded_cash_1, 0))
...
Hope this helps
-
WROOS,
Many thanks for your help. It works a treat......
I also found while looking through the docs that you can turn of the substitution by entering
Set define off;
Once again many thanks for your help
Moff.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|