Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select SQL into a cursor
Message
From
04/12/1997 09:36:51
Elyse Pomerantz
Dynamic Data Concepts, Inc.
Brooklyn, New York, United States
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00063640
Message ID:
00063758
Views:
41
>I have a ComboBox that I would like to list all of the records in a file but I also would like the first entry in the combo box to say "None" or whatever. I thought I would put the "none" record in a cursor and then append the records from the table through a select sql. Well when I do that I lose the "none" record. Is there a way to get all of the records into a cursor from a table using Select SQL and then adding one more record to that cursor?

I do this often using code like:

SELECT Field1,Field2,etc.... ;
FROM MyTable ;
UNION SELECT " {none}","",etc... ;
FROM MyTable ;
INTO CURSOR MyCursor

Just make sure that both SELECTS are "UNION compatible."

Elyse
Elyse Pomerantz
Previous
Reply
Map
View

Click here to load this message in the networking platform