[SQL] Virtual records

2004-01-05 Thread Kumar
Dear Friends,   I am working with Postgres 7.3.4 on RH Linux. Here is a need while developing an Calendar application.   I have a scheduled meeting at every month. While opening the calendar next 2 month, I need to populate the records for it.   I dont want to use a temporary table and populat

Re: [SQL] Complex Update

2004-01-05 Thread Richard Huxton
On Saturday 03 January 2004 09:20, John Coryat wrote: > Problem: I have a table that has a field I want to plug with a value > from other tables. [snip] > I would expect it to look something like this: > > update orderheader set total = (select sum(amount) from orderdetail > where orderdetail.order

[SQL] ecpg - problem compiling prepare and declare statements

2004-01-05 Thread Paul Tilles
Using psql V7.4.1 and ecpg V3.1.0 on RH Linux 7.2, gcc compiler: The following statement precompiles, compiles and links fine: EXEC SQL declare state_cursor cursor for "select unique state from location where post = 1"; I then change the above to EXEC SQL BEGIN DECLARE SECTION; const char *stmt

Re: [SQL] Virtual records

2004-01-05 Thread Rich Hall
How about a stored procedure that generates the set of records programatically. Rick Kumar wrote: Dear Friends, I am working with Postgres 7.3.4 on RH Linux. Here is a need while developing an Calendar application. I have a scheduled meeting at every month. While opening the calendar next

[SQL] Calendar Scripts - Quite a complex one

2004-01-05 Thread Kumar
Dear Friends,   I am working on Postgres 7.3.4 on RH Linux . For our application, we are in a position to give calendar function (appointments and scheduling) with our application. Can somebody suggest me links or sample scripts for developing the calendar function.   It is much similar to MS