Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select Distinct Command
Message
From
18/12/2002 09:07:47
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
18/12/2002 08:59:49
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00734061
Message ID:
00734064
Views:
19
>I have the following SELECT statement:
>
>SELECT DISTINCT field1 AS type1 ;
> field2 AS type2, ;
> 000000 AS valcnt, ;
> 000000 AS invcnt, ;
> 00000000.00 AS chq_tot, ;
> SPACE(40) AS descr, ;
> SPACE(20) AS cname, ;
> 000000.00 AS conv_amt, ;
> m.currpromo AS p_no, ;
> 000.000000000 AS conv_unit ;
> FROM PROM ;
> GROUP BY 1 ;
> INTO TABLE(m.tmp_path + "tmpfile.dbf")
> INDEX ON type1 TO c:\temp\tmpfile.idx COMPACT
>
>I want to SELECT two distinct fields (i.e. field1 & field2).
>
>How do I do this?

Ger,
Remove 'distinct', 'group by 1,2'.
PS: INDEX ON type1 tag type1
sounds to be better.

distinct would also work, then remove group by.
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
Reply
Map
View

Click here to load this message in the networking platform