[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Passing variables to/from Begin-SQL



We can pass variables into this section, but how do we pass variables
out?

let #cust = 1                   !some say potatoe
move 'john' to $name            !some say po-ta-toe
                                ! some say tomato, some say to-ma-to
                                !potatoe, po-ta-toe, tomato, to-ma-toe
                                !Let's call the whole thing off.. tralala...!
for example to pass into;
begin-sql
        insert into customers (cust_num,cust_name) values (#cust,$name)
end-sql

but how do I pass data out;

begin-sql
open my_cursor;
fetch my_cursor into $foobar
end-sql

print $foobar   !$foobar is null even though the fetch was successful