Welcome to the { mindfrost82.com } forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Go Back   { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Programming > Databases > General SQL Server Support

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-29-2008, 09:04 PM
eighthman11
 
Posts: n/a
Distinct Row based on description count

Hello everyone.

Hope someone can help. I have a table with two columns Material
Number and Material Description. Sample data below:

Material# Description
10000 This is item 10000
10000
Reply With Quote
  #2 (permalink)  
Old 07-29-2008, 09:18 PM
Roy Harvey (SQL Server MVP)
 
Posts: n/a
Re: Distinct Row based on description count

On Tue, 29 Jul 2008 13:04:32 -0700 (PDT), eighthman11
<rdshultz@nooter.com> wrote:

>Hello everyone.
>
>Hope someone can help. I have a table with two columns Material
>Number and Material Description. Sample data below:
>
>Material# Description
>10000 This is item 10000
>10000


I see that you started to try to ask a question in the Subject, but it
is not at all clear (to me at least) what you are asking for. Perhaps
you can be a bit more specific.

Roy Harvey
Beacon Falls, CT
Reply With Quote
  #3 (permalink)  
Old 07-29-2008, 09:31 PM
Plamen Ratchev
 
Posts: n/a
Re: Distinct Row based on description count

It is not clear what you need, but maybe this:

SELECT material_nbr, MAX(description) AS material_description
FROM Materials
GROUP BY material_nbr;


Plamen Ratchev
http://www.SQLStudio.com
Reply With Quote
  #4 (permalink)  
Old 07-29-2008, 10:15 PM
--CELKO--
 
Posts: n/a
Re: Distinct Row based on description count

Please post DDL, so that people do not have to guess what the keys,
constraints, Declarative Referential Integrity, data types, etc. in
your schema are. If you know how, follow ISO-11179 data element naming
conventions and formatting rules. Sample data is also a good idea,
along with clear specifications. It is very hard to debug code when
you do not let us see it.

What you did post used #, which will screw up your data dictionary
when you try to put that data element name on the Internet,
"description" of what? etc.

Then you never finished asking a question in the posting. This is too
vague to be considered seriously.

If you want to learn how to ask a question on a Newsgroup, look at:
http://www.catb.org/~esr/faqs/smart-questions.html

Reply With Quote
  #5 (permalink)  
Old 08-02-2008, 09:18 AM
Erland Sommarskog
 
Posts: n/a
Re: Distinct Row based on description count

eighthman11 (rdshultz@nooter.com) writes:
> Hope someone can help. I have a table with two columns Material
> Number and Material Description. Sample data below:
>
> Material# Description
> 10000 This is item 10000
> 10000


Looks like you pressed the Send button too quickly?

--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Reply With Quote
Reply

  { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Programming > Databases > General SQL Server Support


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 11:46 AM.


Powered by vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
© 1999-2008 mindfrost82.com v11.0


Sponsors:
Loans | Currency Converter | Proxy | WoW Gold | Loans



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114