dbTalk Databases Forums  

help on looping through query results - urgent !!!

comp.databases.postgresql.novice comp.databases.postgresql.novice


Discuss help on looping through query results - urgent !!! in the comp.databases.postgresql.novice forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Pradeepkumar, Pyatalo
 
Posts: n/a

Default help on looping through query results - urgent !!! - 08-02-2004 , 02:23 AM







Hi all,

In want to write a function PP_ReadPoints() for my project. I have 2 related
tables....

Point(PointId,CreateTime,TechnicalAddress,PointTyp e,Area);
PointHistory(PointId,Flag);

I have written a trigger such that when i insert a tuple into Point table, a
tuple with the same PointId will be inserted into PointHistory table with
Flag set to 0 as default.
Now from my application i keep calling the PP_ReadPoints() function every 60
seconds. This function has to check for the first 10 tuples in PointHistory
table with Flag=0 and if 0, should retrieve data from Point table and return
the data. Now i need some assistance in doing this as i am very new to
PostgreSQL.

Quote:
With Best Regards
Pradeep Kumar P J


---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.