468,505 Members | 1,803 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,505 developers. It's quick & easy.

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 24615
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Prince Kumar | last post: by
3 posts views Thread by Hans-Dieter Franz | last post: by
5 posts views Thread by Patryk | last post: by
reply views Thread by NPC403 | last post: by
3 posts views Thread by gieforce | last post: by
reply views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.