Toad World® Forums

substitution variable problem


#1

From Sql*Plus documentation:
If you wish to append characters immediately after a substitution variable, use a period to separate the variable from the character. For example:

SELECT SALARY FROM EMP_DETAILS_VIEW WHERE EMPLOYEE_ID=’&X.5’;
Enter value for X: 20
is interpreted as

SELECT SALARY FROM EMP_DETAILS_VIEW WHERE EMPLOYEE_ID=‘205’;

This used to work in Toad(9?)…
Doesn’t work in Toad 10.1.1.8.
Any chance it will come back?
Or is there an alternative?


#2

Morning Gerry,

From Sql*Plus documentation:
If you wish to append characters immediately after a
substitution variable, use a period to separate the variable
from the character. For example:

SELECT SALARY FROM EMP_DETAILS_VIEW WHERE EMPLOYEE_ID=’&X.5’;
Enter value for X: 20
is interpreted as

SELECT SALARY FROM EMP_DETAILS_VIEW WHERE EMPLOYEE_ID=‘205’;

This used to work in Toad(9?)…
Doesn’t work in Toad 10.1.1.8.
Any chance it will come back?
Or is there an alternative?

It works fine in Toad 10.5.1.3 - so it was obviously fixed between your
version and mine.

Cheers,
Norm. [TeamT]

Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else. We have checked this email and its attachments for viruses. But you should still check any attachment before opening it. We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes. If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk

Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else.

We have checked this email and its attachments for viruses. But you should still check any attachment before opening it.
We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes.

If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk


#3

a workaround would be to concat the variable with the constant
SELECT SALARY FROM EMP_DETAILS_VIEW WHERE EMPLOYEE_ID=&X || ‘.5’

Martin Gainty


please do not alter or disrupt this transmission. Thank You