Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Not getting all of the possible records?
Message
 
 
To
26/10/2002 16:25:39
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00715045
Message ID:
00715833
Views:
10
Try
UNION ;
SELECT DISTINCT STR(0, 19) + TTOC(DATETIME(2000,01,01,12,00,00), 1) max_dt ;
FROM names ;
WHERE RECNO() = 1 ;
INTO CURSOR viewNames_Max
>Thanks Sergey, your help led me to a path that would work. What was required to work around the problem was a dumby record.
>
>SELECT STR(a.id, 19) + MAX(TTOC(a.effective_date, 1)) max_dt ;
>FROM names a ;
>GROUP BY a.id ;
>UNION ;
>SELECT DISTINCT STR(0, 19) + TTOC(DATETIME(2000,01,01,12,00,00), 1) max_dt ;
>FROM names a ;
>WHERE 1 = 1 ;
>INTO CURSOR viewNames_Max ;
>ORDER BY 1
>
>The first query pulls all of the valid records, the second creates the dumby record. Do you know of a way to create the record without using "WHERE 1 = 1" and "DISTINCT"?
>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform