On Thu, Dec 20, 2012 at 8:35 AM, Vincent Teachout <[email protected]>wrote:

> Ted Roche wrote:
>
>> Clear as mud?
>>>>
>>>
>> Totally.
>>
>> Do you want a RANDOM value from each table, or one that appears only once?
>>
>> SELECT MyField, COUNT(MyField) AS TheCounter FROM MyTable WHERE {blah blah
>> blah}
>> GROUP BY MyField HAVING TheCounter =1
>>
>
> Each record and field from the table, plus an additional unique value. It
> doesn't need to be random, only guaranteed unique.  But needs to be
> generated by the query, NOT by modifying the table.
>
> Nothing critical, but would make my life a lot easier if such a critter
> exists.
> -----------------
>


UniqueID as first column, whatever you want from table afterwards
select top 100 NEWID(), * from myTable




-- 
Stephen Russell
Sr. Analyst
Ring Container Technology
Oakland TN

901.246-0159 cell


--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/CAJidMYKvNFe=g-CooGT-3xcnk9c=uvs4rn3dygecbr29ys+...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to