Home » Other » Client Tools » SQL*Plus: How to check if a bind variable is already declared? (>=10.2 on Windows)
SQL*Plus: How to check if a bind variable is already declared? [message #683202] Mon, 14 December 2020 03:47 Go to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
My question is in the title.

Background:
I have a SQL*Plus script in which I have to know if a bind variable is already declared or not and in the later I have to declare and assign it a default value.
If the bind variable already exists and has a non-null value, I want to keep it.
One more point: I work on Windows.

It can be done for a substitution variable but can it be for a bind variable?

[Updated on: Mon, 14 December 2020 11:14]

Report message to a moderator

Re: SQL*Plus: How to check if a bind variable is already declared? [message #683203 is a reply to message #683202] Mon, 14 December 2020 11:19 Go to previous message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

I didn't find the answer to the question: "How to check if a bind variable is already declared?" but I found a workaround to my specific issue: give a default value to a possibly not created bind variable.

The solution is detailed in our SQL*Plus FAQ wiki page.

Previous Topic: DatabaseCopy<date><time>.log tab keeps opening in SqlDeveloper 4.1.5.21
Next Topic: How to pass a parameter from PL/Sql block to SQL*Plus
Goto Forum:
  


Current Time: Thu Mar 28 17:31:15 CDT 2024