Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

[NOVICE] how to use variables in postgresql

From: saumya goel <somya.goel(at)gmail.com>
Date: Fri Jun 22 2007 - 01:55:38 EDT


I HAVE A PROBLEM REGARDING DECLARATION/ INITIALISATION OF VARIABLES IN POSTGRESQL FUNCTIONS AND PROCEDURES. MY CODE PRESENTLY LOOKS LIKE CREATE FUNCTION ins_into_std_values() RETURNS void AS
$BODY$

myflag CHAR(1) :='y';
dbms_output.put_line('enter the values sequentially'); loop
if myflag='n' then
exit;
end if;
insert into std_values
values('&tree_species_name','&location',&p,&c1,&c2,&q,&c3,&a,&b,&sp_gravity,&exp_factor); commit;
dbms_output.put_line('records inserted sucessfully'); dbms_output.put_line('enter n to exit or y to continue entering values'); myflag:= '&y or n';
end loop;
commit;
$BODY$

LANGUAGE 'sql' VOLATILE;

BUT IT SHOWS ERROR AT INITIALISATION OF MYFLAG... CAN ANYONE TELL ME HOW TO DECLARE VARIABLES IN POSTGRESQL.. Received on Fri Jun 22 01:57:54 2007

This archive was generated by hypermail 2.1.8 : Fri Jun 22 2007 - 02:00:02 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library