SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
processing SQL Answerset

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
processing SQL Answerset
Author Message
Rick Ireland



Joined: 30 Oct 2000
Posts: 44

Post processing SQL Answerset Reply with quote

Hi -

Is there a prefered method for processing all rows of a SQL answerset? I am converting our old tracking databases into SQL2000, and need to perform various tasks based on entried found in the database.
rs.open "select PayIDs from Ops;" // 5 to 20 rows returned
do while not rs.EOF

DatabaseGet(???, 1, db_payid)

// do something of value with the payer id
loop
rs.close

Wed Oct 24, 2001 3:46 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Re: processing SQL Answerset Reply with quote

DatabaseRetrieve [sql], rows
LoopWhile rows, END_LOOP
DatabaseGet(rows, 1, db_payid)
// do something of value with the payer id
Subtract rows, 1, rows
END_LOOP:

Couple other tips:
-- If you just want to transfer data, use the DatabasePipe statement

-- If you want to transfer data with some simple conversion, create a view in the source database and then use the DatabasePipe. In the view implement the required conversion logic using available SQL functions.

-- If your source data is stored in MS SQL Server or Sybase SQL Server, or SQL Anywhere database you can also use stored procedure as a data source for the DatabaseRetrieve. This might be handy in some cases.

: Hi -

: Is there a prefered method for processing all rows of a SQL answerset? I am
: converting our old tracking databases into SQL2000, and need to perform
: various tasks based on entried found in the database.
: rs.open "select PayIDs from Ops;" // 5 to 20 rows returned
: do while not rs.EOF

: DatabaseGet(???, 1, db_payid)

: // do something of value with the payer id
: loop
: rs.close

Thu Oct 25, 2001 10:00 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.