Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What's wrong with this syntax?
Message
From
24/08/2007 09:21:01
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
24/08/2007 09:05:19
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01250167
Message ID:
01250177
Views:
17
>Hi All:
>
>Can you help me with this code? What's wrong with this syntax?
>
>
>SET STRICTDATE TO 0
>
>SELECT MAX(flocknum) FROM ;
>(SELECT SUBSTR(fm_flcode,5,4) flocknum ;
>FROM flckmast ;
>WHERE fm_hatched <= {4/1/07} ;
>AND fm_hatched >= {3/1/07} ;
>) ;
>INTO CURSOR test
>
>
>Thanks,
>
>Yossi

You forgot to alias subquery. But you don't need a subquery, and use clearer expressions for dates:
SELECT max(SUBSTR(fm_flcode,5,4)) ;
  FROM flckmast ;
 WHERE fm_hatched between date(2007,3,1) and date(2007,4,1) ;
INTO CURSOR test
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform