You can sort first and then SAMPLE, too.

Best Regards,
Caryl Lange
Programmer/Business Analyst
HME
14110 Stowe Drive
Poway, California 92064
phone: (858) 646-8806
fax: (858) 535-6094
mailto:[email protected]
Visit our website: www.hme.com

Avante on Windows/UniData, 9.1.7a way modified and tasty gui, dude


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Oaks, Harold
Sent: Thursday, February 18, 2010 10:21 AM
To: U2 Users List
Subject: Re: [U2] TOP/LIMIT Equivalent?

Andrew:

Indeed, the word is 'sample'.

The command:   SELECT MYFILE SAMPLE 100
will select the first 100 records as they are laid out internally in the
file, so this is somewhat a random selection.  But many times it's all
you want - just get 100 records.

The command  SELECT MYFILE SAMPLED 100
will select every 100th record to the end of the file, so how many you
get back depends on the number of records in the file.  This is a better
way to get a sampling of data across the entire file. 


Harold Oaks
Sr. Programmer/Analyst
County IT
Clark County, WA



-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Andrew E.
Tegenkamp
Sent: Thursday, February 18, 2010 9:50 AM
To: [email protected]
Subject: [U2] TOP/LIMIT Equivalent?

In UniVerse, I can't seem to find the syntax like MSSQL's SELECT TOP 100
or MySQL's LIMIT 100 clause.

Does UniVerse have this syntax somewhere I'm not seeing in the
documentation? I'm just trying to pull out the last 100 records of a
table and export them out as a sample.

Thanks,
Andrew

...............................................
Andrew E. Tegenkamp
Director, Systems Integration
G3 Systems, Inc.
P:540.951.4300
F:540.951.4311
http://www.g3.com


_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to