Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Microsoft SQL Server > Re: GROUP BY a ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 4 Topic 11185 of 11517
Post > Topic >>

Re: GROUP BY a computed column

by --CELKO-- <jcelko212@[EMAIL PROTECTED] > Jun 26, 2008 at 02:30 PM

CREATE TABLE Phrases
(phrase_id INTEGER NOT NULL PRIMARY KEY,
 phrase_txt VARCHAR(500) NOT NULL);

SELECT start_word, COUNT(*) AS start_word_cnt
  FROM (SELECT phrase_id, SUBSTRING (phrase_txt, 1, CHARINDEX(' ',
phrase_txt) - 1)
          FROM Phrases)
       AS FirstWords (phrase_id, start_word)
 GROUP BY start_word;
 




 4 Posts in Topic:
GROUP BY a computed column
The Quiet Center <theq  2008-06-26 13:12:49 
Re: GROUP BY a computed column
"Plamen Ratchev"  2008-06-26 16:54:56 
Re: GROUP BY a computed column
--CELKO-- <jcelko212@[  2008-06-26 14:30:36 
Re: GROUP BY a computed column
Alex Kuznetsov <alkuzo  2008-07-02 09:47:31 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Dec 3 1:19:26 CST 2008.