Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need help with SELECT
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Need help with SELECT
Miscellaneous
Thread ID:
00174354
Message ID:
00174354
Views:
62
What's wrong with my SELECT statement below?

Error I get - "Command contains unrecognized phrase/keyword."

I am trying to select records for a certain year that have a certain ID code and count/list them by month for assorted zip codes.

cField = cRetVal

SELECT mytable.zip, mytable.date ;
FROM mytable ;
WHERE YEAR(mytable.date) = YEAR(DATE())-1 .AND. ;
WHERE mytable.&cField = "1A" .OR. ;
mytable.&cField = "1B" .OR. ;
mytable.&cField = "1C" .OR. ;
ORDER BY MONTH(mytable.date) ;
INTO CURSOR rpt

Thanks for helping me out.
Steve Kramer
Kramer & Kramer Design
"Home of Go Cartoons"
Web Site: www.stephenkramer.com
Would you believe Far Side Lite?
More than 270 original cartoons.
Next
Reply
Map
View

Click here to load this message in the networking platform