[SQL] user defined function question

2001-08-20 Thread Joseph Syjuco
how do i return a resultset from a user defined function. pls show a simple structure ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

[SQL]

2001-09-03 Thread Joseph Syjuco
im new in postgresql (actually came from SQL Server) and i was trying a script like this insert into table1(field1,field2) values (select field1, field2 from table 2); i dont know if this is possible (inserting a set of entries via resultset from a select stmt in one command). If anyone has any

[SQL] variance aggregate function incorrect? Reference Materials regcreate aggregate

2002-06-24 Thread Joseph Syjuco
hi i needed the variance function ... i dont know if i introduced the wrong parameters or maybe this variance is not the variance that im looking for but it doesnt provide the right results variance=(nEx^2 - (Ex)^2)/(n(n-1)) my sql statement select variance(answer) from tbl_answer (where answer i

[SQL] assign count() result to a declared variable in plpgsql

2002-06-24 Thread Joseph Syjuco
i want to put my count() result in a plpgsql declared integer variable declare f_count_var integer; begin select into f_count_var count(empno) from employee end; tried this one but it doesnt work ---(end of broadcast)--- TIP 3:

[SQL] transaction in plpgsql

2002-06-27 Thread Joseph Syjuco
how can i implement transactions inside my plpgsql functions ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

[SQL] export plpgsql function to file

2002-07-09 Thread Joseph Syjuco
how can i export my postgresql function to a file? ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

[SQL] how do i import my sql query result to a file

2002-07-18 Thread Joseph Syjuco
how do i import results of my select query to a file thanks ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

Re: [SQL] how do i import my sql query result to a file

2002-07-18 Thread Joseph Syjuco
thanks for the tips !!! actually i used \g . Again thanks On Thu, 2002-07-18 at 20:34, Ludwig Lim wrote: > > --- Joseph Syjuco <[EMAIL PROTECTED]> wrote: > > how do i import results of my select query to a file > > thanks > > > > in the psql command promp

[SQL] determine if a table exists

2002-08-01 Thread Joseph Syjuco
how do i determine if a table exists using select statement i want to find out if it exists if not ill create it if yes then ill do some editing with it TIA ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

[SQL] select case problem

2002-09-24 Thread Joseph Syjuco
i have a table with the fields empno (not null) and division_no (null allowed) what i wanted to do is to do a select case statement such that when division_no is null itll output 'No division' if its not null itll output 'with division' unfortunately this statement doesnt work ... i need help on t

[SQL] getting the current date

2002-10-16 Thread Joseph Syjuco
how can i get the current date (without the time part) in sql. I tried doing a select now() but it also gives me the time part TIA joseph ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster