473,382 Members | 1,357 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

SQL0206N "C" is not valid in the context where it is used. SQLSTATE=42703

Procedure Get_RowCount works fine when called independently.

When called from Another procedure it gives the following error.

SQL0206N "C" is not valid in the context where it is used.
SQLSTATE=42703

PROCEDURE Get_RowCount( InSchemaName VARCHAR(30),
InTableName VARCHAR(30),
InWhereClause VARCHAR(1000),
InGroupBy VARCHAR(1000),
OUT RowCount INT)

PROCEDURE LogStart has the following Call
CALL get_RowCount(l_SchemaName, l_TableName ,
l_WhereCLause, l_Group
By , l_RowCount);

Here are the declarations for the variable. used to call the Function.
DECLARE l_SchemaName VARCHAR(30);
DECLARE l_TableName VARCHAR(30);
DECLARE l_WhereClause VARCHAR(1000);
DECLARE l_GroupBy VARCHAR(1000);
DECLARE l_RowCount INTEGER DEFAULT 0;

This gives out the below error

SQL0206N "C" is not valid in the context where it is used.
SQLSTATE=42703

I think the Data Types Match. Whats giving?

Nov 12 '05 #1
1 28514
Zri Man wrote:
Procedure Get_RowCount works fine when called independently.

When called from Another procedure it gives the following error.

SQL0206N "C" is not valid in the context where it is used.
SQLSTATE=42703

PROCEDURE Get_RowCount( InSchemaName VARCHAR(30),
InTableName VARCHAR(30),
InWhereClause VARCHAR(1000),
InGroupBy VARCHAR(1000),
OUT RowCount INT)

PROCEDURE LogStart has the following Call
CALL get_RowCount(l_SchemaName, l_TableName ,
l_WhereCLause, l_Group
By , l_RowCount);

Here are the declarations for the variable. used to call the Function.
DECLARE l_SchemaName VARCHAR(30);
DECLARE l_TableName VARCHAR(30);
DECLARE l_WhereClause VARCHAR(1000);
DECLARE l_GroupBy VARCHAR(1000);
DECLARE l_RowCount INTEGER DEFAULT 0;

This gives out the below error

SQL0206N "C" is not valid in the context where it is used.
SQLSTATE=42703

I think the Data Types Match. Whats giving?

I take a wild guess here:
This error is not coming from the CALL statement.
It's an unhandled error leaking out from get_RowCount().
I'm taking another wild guess:
You have a column "c" in the table, but you are looking for "C".

Cheers
Serge

--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: John | last post by:
Hi all, I am doing the change from having worked in Oracle for a long time to MS SQL server and am frustrated with a couple of simple SQL stmt's. Or at least they have always been easy. The...
3
by: Prince Kumar | last post by:
Hi All, I am trying to a get a trigger retrieved from Oracle to work on DB2 UDB 8.1. I am getting the following error when trying to create the trigger. How would I resolve this? create table...
3
by: Hans-Dieter Franz | last post by:
Hello, I have a problem with a Java user-defined stored procedure and the "alter sequence" statement. I use DB2 8.1.2 and had the same problem with 8.1.0, but not with 7.*. I get the following...
5
by: Patryk | last post by:
Hello I using websphere and db2 (v8). I have a problem with this select: SELECT * FROM ( SELECT ROW_NUMBER() OVER() AS ROWNUM, * FROM S.A AA) AA WHERE ROWNUM BETWEEN 5 AND 20; From console...
2
by: graju80 | last post by:
Hey Gurus..I am trying to figures out where my syntax is incorrect in the following SQL to to create an after insert trigger... I am getting SQL0206N "INSERTROW.MF_USERID" is not valid in the...
0
by: Johnny Ocampo | last post by:
Hi, I'm trying to use Microsoft Query to read data from DB2. However, I'm getting the following error message: SQL0206N "BLOB" is not valid in the context where it is used. SQLSTATE=42703. ...
1
by: bswanstrom | last post by:
Hi there, trying to execute a db2 sql statement from a command line from UNIX. Here is the command I'm running db2 export to /work/ftp/lt/sku_insert.csv of del select digits'('UPC_NO')', UPC,...
0
by: KiranKGone | last post by:
Hello All, I need to define a trigger for updating the multiple columns of a target table when an insert happens on a subject table. I have written the following trigger, however, getting the...
1
by: 7h0r | last post by:
When trying to insert this trigger: CREATE TRIGGER ad_des_part_jon AFTER DELETE ON DESIGJON.PART_LIST REFERENCING OLD AS o FOR EACH ROW mode db2sql UPDATE DEFINJON.PART_LIST A SET...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.