Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Pl SQL help, SELECT-INTO statement not assign value on host variable

786985Jul 23 2010 — edited Jul 23 2010
I have the table Client with column idClient (integer) and at least 3 clients into the table...
Here is the code:

EXEC SQL BEGIN DECLARE SECTION;
int v_idClient;
short idClientInd;
EXEC SQL END DECLARE SECTION ;

//connect code is here

EXEC SQL SELECT idClient INTO :v_idClient:idClientInd FROM Client
WHERE idClient=1;

if(idClientInd == -1)
cout<<"Not Exist"<<endl;
else
cout<<"Exist"<<endl;

my host variable c_idCLient can't be assigned with value '1'...duno why? same thing for Indicator variable...
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 20 2010
Added on Jul 23 2010
17 comments
2,308 views