Questions tagged [bind-variables]

A bind variable is an unspecified value (in other words, a placeholder) in a prepared database statement/command. The actual values of the bind variable is to be assigned when the statement or command is executed.

147 questions
0
votes
0 answers

Zend_Db - define not done before fetch or execute and fetch

I have a send_mail() procedure in Oracle that handles all the emails. I can call that procedure from a Zend query with no errors $db->query("blah blah"); but when I use a $stmt = $db->prepare("blah blah"); I get the error (though the email still…
Kal
  • 2,239
  • 6
  • 36
  • 74
0
votes
1 answer

binding variables in an EJB query IN clause

Is it possible to bind a list in an EJB IN clause like this? Query query = myEntitymanager.createNativeQuery("SELECT e FROM EntityName e WHERE e.id IN (:ids)"); //ids is a List of Long query.setParameter("ids", ids); result = query.getResultSet();
0
votes
2 answers

How to circumvent the maximum number of bind values for Sybase ASE and SQL Server

I'm running jOOQ integration tests for large conditions of the form WHERE x IN (:1, :2, :3, :4, ..., :3001, :3002) The above example depicts that there are many bind variables in an IN condition. Oracle has a well-known limitation of 1000 values…
Lukas Eder
  • 211,314
  • 129
  • 689
  • 1,509
0
votes
2 answers

Accessing Bind Variable in PL/SQL

I am trying to run a program in the Oracle express edition editor. When I execute the program, I get an error ORA-06502: PL/SQL: numeric or value error: character string buffer too small Can anyone help me understand why I am getting an error and…
S.P
  • 1,775
  • 5
  • 14
  • 21
-1
votes
2 answers

How to create a procedure by joining two tables that doesn't have a common column in oracle sql?

Table 1: EMP Columns: EMPNO,ENAME,SAL,JOB,DEPTNO Table 2 : SALGRADE Columns : GRADE,HISAL,LOSAL Given the EMPNO of an employee as input to the procedure, I'll have to get the corresponding Grade and SAL as output.
-1
votes
3 answers

How to bind arrays in a variable in PL/SQL

How to bind arrays in a variable in PL/SQL. For Example i have below array: array_col3 = {1,2,3,4,5,6,7} now i want to select from a table based on the array. select * from tabA where col3 in (select * from (:array_col3));
Abhi85
  • 17
  • 1
  • 5
-1
votes
1 answer

Perl DBI Sybase Asanywhere Problems with bind variables

I have to switch my webserver (internal use only) to a more recent version and so I have also new perl and new DBD:Sybase instead of DBD:ASAny I used before. I use statements with bind variables regulary, they worked fine, but with DBD:Sybase I get…
-1
votes
2 answers

Bad bind variable error with select statement inside a trigger in Oracle

I'm trying to insert a record into a table that's identical to the record that was changed in another table, using a trigger. I also need to insert whether the operation was an insert, update or delete CREATE OR REPLACE TRIGGER triggername AFTER…
-1
votes
1 answer

How to use bind variable in asp.net (behind of button)?

I used once, bind variable in pl/sql with stored procedure. (To speed up my query result). For example in stored procedure I use it like so: create or replace procedure dsal(p_empno in number) as begin execute immediate 'update emp set …
H Bıyıkcı
  • 25
  • 1
  • 8
-1
votes
1 answer

get value as integer from QlineEdit and bindit in sqlite

i tried to entre data from a form " means from QlineEdit as integer " the programm is compiled successfully but when i open the form and entre data , the programm crach her's the erreur Object::connect: No such slot…
-2
votes
1 answer

Oracle PL/SQL - Bind Variables Basic Issue - ORA-00900

I am trying to use BIND variables in Oracle SQL Developer, but each time I execute I got ORA-00900 'Invalid SQL statement" Error. Here is my code: VARIABLE v_bind1 NUMBER; Here is error that I…
-2
votes
1 answer

Is it bad form to join against a subselect like this, to avoid duplicate bind variables?

Here's a simplified sample query, done the "traditional" way (sample queries tested in PostgreSQL 8.3): PREPARE a AS SELECT * FROM users WHERE uid=$1 OR parent=$2; EXECUTE a(0,0); The trouble is, it's cumbersome to pass the same bind variable…
Jonathan Hall
  • 75,165
  • 16
  • 143
  • 189
1 2 3
9
10