![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I need to buid a SELECT statement for a software designed to make a simple request, like "SELECT value FROM table WHERE arg = 'argument'" My Problem is the request I wish to write is very complex : select from table A then if there is no results from table A then select from table B I think I have to write a stored procedure in PL/pgsql but I'm not familiar with PL/sql nor PL/pgsql (only know TransacSQL from Microsoft...) and I don't know how to do... Thanks for any suggestions ! -- Rico |
#3
| |||
| |||
|
|
I need to buid a SELECT statement for a software designed to make a simple request, like "SELECT value FROM table WHERE arg = 'argument'" My Problem is the request I wish to write is very complex : select from table A then if there is no results from table A then select from table B I think I have to write a stored procedure in PL/pgsql but I'm not familiar with PL/sql nor PL/pgsql (only know TransacSQL from Microsoft...) and I don't know how to do... Though this is not exactly what you requested, it should give you a very good start: CREATE OR REPLACE FUNCTION InsertTransaction(checknumber int4, month int4, day int4, year int4, CompanyName text, citystate text, TypeOfTransaction text, amount numeric(10,2)) RETURNS text AS [...] |
![]() |
| Thread Tools | |
| Display Modes | |
| |