By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,007 Members | 1,248 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,007 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.