472,961 Members | 1,755 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,961 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 28272
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...
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.