[GENERAL] aliases for temp tables....

2001-02-15 Thread Alfonso Peniche
I've been looking everywhere and I can't find this: Everytime I create a temp table (Thanx Tom) within a procedure, a table named like pg_temp.###.# is created (I know this is MY temp table). How can I know the name (or alias) for this table so that I can, later on, check if it already exists. E

[GENERAL] temp table creation

2001-02-14 Thread Alfonso Peniche
What's wrong with this function? The syntax is supposed to be right, isn't it? Create function UsaTablaTemporal() RETURNS integer AS ' BEGIN SELECT p.apellidos, p.nombres, u.username INTO TEMP TABLE mitabla FROM persona p, usuario u WHERE p.idpersona = u.idusuario

[GENERAL] temporary tables

2001-02-13 Thread Alfonso Peniche
Since I cannot return a set of values (namely rows from a table) from a function, I thought I could create a temporary table where I could place the resulting information. Unfortunately I have a big problem. If I create this table and run the same procedure again (during the same session) I'll ge

[GENERAL] bug with distinct?

2001-02-09 Thread Alfonso Peniche
I dont' know if this a bug or I am just out of my mind, but since it works with other RDBMS's I decided to ask, so here it goes: I am trying to do the following: SELECT distinct 'mod_type' ,currval('mytable_idmytable_seq') from mytable; and I get the message: ERROR: Unable to identify an

[GENERAL] About SP's and parameters

2001-02-08 Thread Alfonso Peniche
Hi all: Is there a way to pass a tablename as a parameter to a SP? I'll try to explain myself. I want to create a SP that can, for instance, do a delete from .. so that any particular application all it has to do is call the SP sending the table to be deleted. Right now I have:

[GENERAL] Re: Select in function?

2001-02-07 Thread Alfonso Peniche
se the PERFORM query if you don't care about the return value from a > SELECT. If you wish to use the special FOUND variable, you have to SELECT > .. INTO. > > Hope that helps, > > Andrew. > > On Tue, 6 Feb 2001, Alfonso Peniche wrote: > > > I have the follow

[GENERAL] Verifying transaction success

2001-02-02 Thread Alfonso Peniche
Is there a way (in plpgsql) to know if an insert, update or delete instruction was successful without having to run a select statement after either one? Something like an error flag, a set of instructions, a process... Thanks again.

[GENERAL] Re: get last sequence

2001-01-26 Thread Alfonso Peniche
"Mr. Chan" wrote: > dear all, > how to get last sequence from postgresql? I mean such mysql > last_insert_id function or ms sql select @@identity. > thanks! > Chan Select currval('sequence_name_id') from tablename; this will give you the last sequence generated in tablename

[GENERAL] Problem with inheritance

2001-01-26 Thread Alfonso Peniche
Alfonso Peniche

[GENERAL] Re: converting .xls to delimited file

2001-01-10 Thread Alfonso Peniche
Try saving it as a .CSV file and then you can choose the delimiter you want. William Staniewicz wrote: > Is there any way to convert an Excel file (".xls") > to a delimited file? Maybe using sed? > > Bill

[GENERAL] ODBC 7.x for windows

2001-01-05 Thread Alfonso Peniche
Anybody knows where I can find the windows - ODBC driver for the latest version of PostgreSQL (7.0.3)? Thanx