If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Other > Ingres / ABF / Table field

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-21-03, 08:35
arc-intl arc-intl is offline
Registered User
 
Join Date: Jan 2003
Posts: 1
Lightbulb Ingres / ABF / Table field

Hi, and thanks for any help.

After loading data in a table field with a select statement like such:

tbf = select col1, col2,...
from my_table
order by col1,col2;

I want to reorder the table field by col2. Any idea ?
I know that i can run a external C procedure and use a qsort, but i prefere to stay in my 4GL program.
thanks.
Regards.
Reply With Quote
  #2 (permalink)  
Old 01-22-03, 19:04
jahowell jahowell is offline
Registered User
 
Join Date: Aug 2002
Location: Brisbane Australia
Posts: 6
re: ABF tablefields

Declare a global temporary table with the same structure as the tablefield, load the global temp from the tablefield using unloadtable, reload the tablefield from the global temp table using ORDER BY then drop the global temporary table.

I suppose you could code a qsort for the tablefield, but it could be difficult to code because tablefield[n] refers to the position on the screen rather than the underlying dataset. Alternatively you could load the tablefield into an array and sort that, but you may as well use a global temporary table...
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On