>Hi all,
>
>I have two problems:
>
>1.)
>I have table. From this table I want create cursor where get to all record in this cursor number for his position in cursor.
>First record in cursor have "position" 1, second record in cursor have
>"position" 2, ....
>The "position" is new column in cursor.
>How Can I solve this problem ?
Open the table in the table designer and add a field named 'position'. Make it a primary index and set the default value to a stored procedure that generates a new unique position number.
>
>2.)
>How Can I create SELECT (cursor), where load only one record with specified position by ORDER item.
>Example: I want get only 5th record from table ordered by "name" ("name" is index column in table)
>
>Thanks.
You can't order the fields in a record using 'order by'. You you can order the fields in the cursor by using SELECT field2, field4, filed1 etc. If you want the 5th record, SELECT f1,f3,f2 from mytable where position = 5 into cursor x
ORDER BY is used for multiple record select statements.
Eric K.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only