Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Help
Message
From
02/08/2007 04:40:30
 
 
To
01/08/2007 09:50:23
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01245144
Message ID:
01245411
Views:
23
>Hi all,
>
>I am trying the following SQL command
>
>SELECT Id, Forename, Compname, SUM(OrdTotal) TotOrd ;
> FROM clients LEFT JOIN Prsndetl ON Clients.Id = PrsnDetl.ClientId;
> LEFT JOIN Orders ON Clients.Id = Orders.ClientId;
> GROUP BY Clients.Id, Clients.Compname, PrsnDetl.Forename;
> WHERE '01' $ LOWER(Clients.CompName) ;
> OR 'hr' $ LOWER(PrsnDetl.Forename) ;
> OR TotOrd = 300
>
>The system gives me error that "variable TotOrd is not found". Any ideas, how I can use the column in my where clause.
>
>Many thanks in advance,
>Abhi
SELECT Id, Forename, Compname, SUM(OrdTotal) TotOrd ;
FROM clients LEFT JOIN Prsndetl ON Clients.Id = PrsnDetl.ClientId;
LEFT JOIN Orders ON Clients.Id = Orders.ClientId;
GROUP BY Clients.Id, Clients.Compname, PrsnDetl.Forename;
HAVING '01' $ LOWER(Clients.CompName) ;
OR 'hr' $ LOWER(PrsnDetl.Forename) ;
OR TotOrd = 300
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform