[HOW TO] Get bind variable names?

Lets say I have the following Oracle query: "SELECT 1 FROM DUAL WHERE :bind_me1 IS NULL AND :bind_me2 IS NOT NULL".

 In my case I don't know how many bind variables there are going to be or what their names are. Is there a way I can get the names of the bind variables (in this case bind_me1 and bind_me2) from the query?

Regular expressions are a possibility but I'm thinking there must be a better solution.

 

Thanks in advance.


Never underestimate the predictability of stupidity.
0
jhilden
4/30/2009 4:45:59 PM
asp.net.oracle 2269 articles. 0 followers. Follow

3 Replies
489 Views

Similar Articles

[PageSpeed] 41

Are you going to select anything from the database or not?


Many Thanks & Best Regards,
HuaMin Chen

(Mark it as answer if it does help you!)
0
wmec
5/1/2009 12:14:32 PM

 Lets keep things simple and say that I'm going to be doing all "SELECT 1 FROM DUAL WHERE..." statements, that way I'm only checking that the return value exists or not.

 

I'm not sure why what I'm selecting would make a difference though.


Never underestimate the predictability of stupidity.
0
jhilden
5/1/2009 2:48:50 PM

What values do you expect to retrieve/return from the database? If you're checking any conditions other than from the DB, you can use conditonal checking directly instead of using 'select ... from dual ...'.


Many Thanks & Best Regards,
HuaMin Chen

(Mark it as answer if it does help you!)
0
wmec
5/4/2009 2:18:11 AM
Reply:

Similar Artilces:

Update a Oracle database from datagrid getting error ORA-01036: Illegal variable name/number
HiI have a datagrid whereby i edit 2 columns and then select the update link to update the row back into  the database. With the code shown below, when i attempt to perform the update i get the error ORA-01036: Illegal variable name/number. I have looked through some similar problems on the website, and my parameter names are not more than 32 characters long.  Would it be possible to have a look and see where the code is going wrong. I suspect it may be to do with the VARCHAR2 being used, and the code using VARCHAR ( am not allowed to change the database ). The code actually connec...

how to get variable value by using variable name as parameter???
I have a problem as following; I want to give my variable name as parameter to a function, then get value of that variable. Like this; dim myValue, myVariable, result  as stringmyValue = "demo"myVariable = "myValue"result = SomeMagicFunction(myVariable)then value of result sould be demoI know that is an interesting case. But i need this. :( Please help me !!... If you explain the situation where it is going to be used, there may be some other alternative solution to it. One solution is to store value in a property of a class or structure and then later on use reflection to retrie...

vb.net function and Oracle procedure to get an Oracle Dataset??
I have similar code (a procedure and function) working perfectly with a sql server data source. I;'m trying to do the same things with Oracle, but have run into the problems.    I'm not an oracle expert, so I'm not sure if producing a cursor is my only and best  option. create or replace package body PK_RETAILER isPROCEDURE sp_Get_Order_History(v_ani IN number,output_cursor out PK_CURSORES.generic_cursor) ASBEGINopen output_cursor forselect o.account_number, p.phone, o.amount, o.name, o.init_datefrom orders ojoin users_phones p on p.account_number...

Oracle and Bind Variables
For years, we have included the DBParm "DisableBind=1" in our systems because, without it, we'd get errors (specifically, "Rows have changed between Retrieve and Update" errors). The software works fine with the DisableBind=1. Once removed, things that worked fine stop working. This is currently with PowerBuilder 6.5.1 and Oracle 8 (with NET8). We are using the PowerBuilder Oracle 7.3 driver (since the 8 driver gives other mysterious errors). Anyone have any ideas? I've checked Sybase's InfoBase, but wasn't able to come up with anything. Ma...

How can I get a "variable value" from the "variable name"
Hi All, How can I get a "variable value" from the "variable name" ? For Example: ClassDefinition cd_def VariableDefinition vd_def cd_def = this.classdefinition For li_i = 1 To UpperBound (cd_def.VariableList) vd_def = cd_def.VariableList[li_i] MessageBox ("Variable Name: ", vd_def.name ) MessageBox ("Variable Value: ", "??????????") Next Thanks, Gustavo Which value do you expect to get? pbm_thisusuallydoesnothelp:-)) Philip Salgannik <Gustavo> wrote in message news:4069b28a.30f0.846930886@sybase.co...

Oracle Bind Variable
Is there a way in PB to declare and assign a value to a bind variable directly in PowerScript ? Something like.. ls_Sql "EXECUTER IMMEDIATE "+:ls_SQL Pretty much like you have it. Production snippet: s_command = 'ALTER USER ' + i_s_user + ' IDENTIFIED BY "' + s_password + '"' EXECUTE IMMEDIATE :s_command USING i_tr_sql; Francois wrote in message <8AA20BCF2D48F8FC005284C285256B51.005284D985256B51@webforums>... >Is there a way in PB to declare and assign a value to a bind variable >directly in PowerScript ? > &g...

Bind variables in Oracle
How do you turn off the bind variables in Oracle so I do not see :1, :2, :3 etc... in my sql preview event? TIA, Steve Check disablebind dbparm parameter. On Wed, 13 Nov 2002 16:19:21 -0500, in powersoft.public.powerbuilder.general <Steve> wrote: >How do you turn off the bind variables in Oracle so I do not see :1, :2, :3 >etc... in my sql preview event? > >TIA, > >Steve > I responded in the database (or was it datawindow?) section, where you also posted. On Wed, 13 Nov 2002 16:19:21 -0500, Steve wrote: >How do you turn off the b...

get variable name
Hi! it's seems to be vwry simple, but I look for it to long time: I want go through variable names and set, for example, some values to each string Var1; string Var2; string Current_Var; for(i=1; i<=2; i++) { Current_Var = FindControl("Var"+i); Current_Var = i; } but this FindControl is only for ControlElements. Is any function for variables like this? Thanks hello, why do u want to use Findcontrol ? can't u just use an array of variables ? string[] var = new new string[2]; for(i=1; i<=2; i++) { Current_Var = v...

Bind Variables in Oracle
How do I turn off bind variables in PB using an Oracle database so that I do not see :1, :2, :3? Just curious, but why do people feel the need to forward date their posts? There are always people that do not like to play by the rules aren't there? Maybe if people would stop answering their questions, they would stop acting like children. Sorry for digressing (sp)! TIA, Steve On Wed, 13 Nov 2002 16:40:00 -0500, Steve wrote: >How do I turn off bind variables in PB using an Oracle database so that I >do not see :1, :2, :3? DisableBind=1 in the DBParm parameter...

how to get a control ID from a bind field name / bound field (column) name from a formview's control
I have a form view which is bound to a table, now from codebehind file I need to apply some formatting based on some of the field's bound control. For example, if Formview1 is bound to Employee table, and it's item template has a control with ID "Label1" which is bound to "EmployeeJoinDate" . Now, I have a different table which has a list of field name(EmployeeJoinDate is one of them), all of which should be applied some formatting based on some condition. Now I can take two approach for that, but I am stuck at both:  1. If I can somehow get the contro...

been a while
I haven't coded in perl for far too long... that aside.. How do I define variable variable names ? I have an array that contains the header cells of some long columns, from which i want to create new arrays which are called by the names in the array. e.g. @header = (Name, Address, Date, Expiry) And create arrays @name, @address...etc Header contents, of course, change order and content. Hope you can help Michael Carmody MDU, Public Health Lab Dept. of Microbiology and Immunology The University of Melbourne, Parkville On Thursday, May 23, 2002, at 05:39 , ...

variable variable-names
Hi all, I'm trying to write a script that will pull out values for form data radio buttons for muliple answers. This is what a standard line looks like: <INPUT TYPE="radio" NAME="answer1" VALUE="blah">Blah For each question I've tried to make up a separate set of arrays containing the button values: open (QUES, "<questions.poll"); foreach $line (<QUES>) { chomp $line; if ($line =~ m|[^"]*NAME="answer(\d)"\s*VALUE="([^"]*)"|) { $num = $1; $value_label = $2; ...

Variable variable names
------_=_NextPart_001_01CB7729.624A48CF Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello, In the below code I am desperately trying to accomplish the valid use of = variable variable names but still fail. I have already read many sites, = tutorials, mailing list posts, all saying that this is best accomplished = by using a hash. Please would you tell me if I understood that correctly = and, even more important, if I interpreted and tried to realize it = correctly? And if someone could tell me why the script gives me error...

Where can I get native PB drivers for ( Oracle Version 8.0.0.5) with Oracle Net Client Version 7.3.3
( Oracle Version 8.0.0.5) with Oracle Net Client Version 7.3.3 with SQL *Net version 2.x , 32 bit implementation. All versions of PB Enterprise (5,6,7) have the native O73 driver. If you have PB Professional, you can only use ODBC to connect to Oracle. -- Terry Dykstra (TeamSybase) Canadian Forest Oil Ltd. Check out Sybase Developer's Network: http://www.sybase.com/sdn Veena Madhavi <bveenamadhavi@hotmail.com> wrote in message news:38A8FD91.6218D227@hotmail.com... > ( Oracle Version 8.0.0.5) with Oracle Net Client Version 7.3.3 with SQL > *Net version 2...

Web resources about - [HOW TO] Get bind variable names? - asp.net.oracle

Variable - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Westpac interest rate rise is one of many variable loan rate rises
WESTPAC is not alone in hitting its owner-occupier customers with a surprise interest rate rise, as dozens of other variable rate home loans ...

Airbnb upgrades variable pricing tool for hosts
Online home rental group Airbnb is rolling out an upgraded variable pricing tool that automatically raises or cuts room rates based on supply ...

Commonwealth Bank raises variable home loan rates
Home owners' mortgage costs are set to rise by hundreds of dollars a year, after the Commonwealth Bank became the latest bank to hike interest ...

CBA lifts variable home loan rates to offset costs associated with stricter capital requirements
The Commonwealth Bank to lift its home loan interest rates independently of the Reserve Bank to partially offset costs associated with stricter ...

Washington Square Signs Spielbergs, Choi Joins Variable and More
... films and an episode of the HBO comedy series "Girls," on which he plays the role of Ray Ploshansky. New York-based creative collective Variable ...

YouTube v10.32 Tweaks Some Interface Elements And Includes Hints About Virtual Reality Content And Variable ...
Forget Update Wednesday! Monday is the new big day. Not only were we treated to the latest M preview release and the official Marshmallow name, ...

"You have to ignore many variables to think women are paid less than men. California is happy to try." ...
Writes Sarah Ketterer in The Wall Street Journal in "The ‘Wage Gap’ Myth That Won’t Die" (which you can get to without subscribing if you Google ...

Cisco Debuts Open Pay Variable Pricing, Updates CCRE
Cisco Debuts Open Pay Variable Pricing, Updates CCRE Channel Partners Kris Snow, president of Cisco Capital, says the company's new Open Pay ...

Expert Reveals the Latest Variable Capacity Technology
Learn about gForce Ultra CRAC equipment, the latest variable capacity technology to lower energy usage and increase reliability.

Resources last updated: 12/7/2015 5:18:26 PM