Re: [WW Spam: medium] [SQL] Building a database from a flat file

2005-03-03 Thread RobertD . Stewart
Could you set up functions triggers on the temp table that would do updates and inserts on the other tables from the data entered into the temp table? Then all you would have to do is inter the data into the temp table -Original Message- From: Casey T. Deccio [mailto:[EMAIL PROTECTED] Se

Re: [SQL] Looking for examples of S/P

2005-01-19 Thread RobertD . Stewart
I use this stored procedure to insert data into tables from my web page. I call it using select insert_masteraccount($1,$,2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13); CREATE OR REPLACE FUNCTION insert_masteraccount("varchar", "varchar", "varchar", "varchar", "varchar", "varchar", "varchar", "varchar

Re: [SQL] Table History

2004-12-17 Thread RobertD . Stewart
Here is a example of a trigger function CREATE OR REPLACE FUNCTION public.ipinfo_trg() RETURNS trigger AS 'DECLARE dhcpvarchar:=\'DHCP\'; rtype varchar:=\'RAS\'; BEGIN if NEW.ipaddress != dhcp then if OLD.ipaddress != dhcp then if OLD.atype != rtype then

[SQL] stored procedures in postgresql user plpgsql

2004-11-29 Thread RobertD . Stewart
I know that there are not stored procedures like that in oracle. I know that you have to create functions.   I have tried to create a simple function to select data from a table.  Could you all please correct me   Thanks     CREATE FUNCTION retrive_atype(varchar) RETURNS varchar AS '