Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Query Problem
Message
 
 
To
18/07/2000 09:01:41
General information
Forum:
Visual FoxPro
Category:
Client/server
Title:
Miscellaneous
Thread ID:
00393731
Message ID:
00393859
Views:
16
>Hi,
>
>I'm trying to consruct a query which I can send to VFP, Oracle or SQL Server and get the same result. The query, which works fine with VFP, is as follows:
>
>Select training.idtraining, training.course, training.subject, training.held from training group by course
>
>i.e. I want a resulting cursor with these fields, where the course field contains unique values.

You can not do this if the IDTraining field is unique. The first 3 fields have to be the same value for each unique course. If that is not so, the query will fail. You will also have to not select the HELD field as this is probably not unique for each courseid. Otherwise, the following should work in Oracle.

select distinct(courseid), course, subject from training

Keep in mind Oracle is not as liberal with SQL syntax like VFP and, possibly SQL Server. If this is not what you are looking for, you will need to provide sample data.
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform