Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Variables

Status
Not open for further replies.

garikke

Computer
Aug 2, 2001
1
What is wrong here?

DECLARE
s_id VARCHAR2(32);
s_id =(select store_id from store where key_store_seqid = '&&storeNumber');

BEGIN

select txorder_id, from txorder where order_number = '&&orderNumber' and store_id = '$s_id';

END;
/
 
Replies continue below

Recommended for you

Not sure if this applies, but i had trouble doing an SQLvar1 = "INSERT INTO tablename1 (field1) VALUES ("'& aspformvar1 &'")"

This shows the syntax i was looking for.
it's the asp var name from a submitted form, inside an & on each side, inside single quotes, inside double quotes.

does this make sense? i'm really glad i got it working!! a friend of mine knew the deal and told me the syntax. thank you jason!

dcp - dcparham@directvinternet.com
 
One thing that I noticed is that you are declaring s_id as a varchar2 with a length of only 32. You are then trying to build s_id as something a lot bigger than 32 characters.
 
hi dcparham
the syntax is wrong, you wrote>>
"select txorder_id, from txorder where "

remove comma(,) after "txorder_id," and run it.


bye
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor