Viewing 15 posts - 1 through 15 (of 110 total)
GilaMonster (3/25/2008)
Koji Matsumura (3/25/2008)
SELECT roll, MAX(sname) FROM Table ORDER BY roll
SELECT roll, MAX(sname)
FROM Table
GROUP BY roll
ORDER BY roll
Thank you Gail.
March 25, 2008 at 10:47 pm
SELECT roll, MAX(sname) FROM Table ORDER BY roll
March 25, 2008 at 3:12 am
DECLARE @Table_1 TABLE (Col1 int, Col2 int, Col3 char(4), Col4 char(4))
INSERT INTO @Table_1 SELECT 1, 101, 'Usr1', 'WRK1'
UNION ALL SELECT 2, '101', 'Usr2', 'WRK1'
DECLARE @Table_2 TABLE (Col1 int, Msg char(20))
INSERT...
March 25, 2008 at 12:07 am
GilaMonster (1/4/2008)
Koji Matsumura (1/4/2008)[hr
Thank you Gail for the info.
I guess I was somehow confused with char VS varchar datatype.
Yeah. The varxxx datatypes have 2 bytes extra to store the data...
January 4, 2008 at 1:43 am
GilaMonster (1/4/2008)
Koji Matsumura (1/4/2008)
In SQL Server , all representation of the NULL value are the same.Nullable datatypes are one byte larger than non-nullable ones.
Null and not null datatypes are the...
January 4, 2008 at 1:28 am
karthikeyan (1/4/2008)
1) When a NULL value appears as an operand to...
January 4, 2008 at 1:07 am
Jeff Moden (12/28/2007)
Exactly what I did in my cross-tab code... nice, job, Koji...
Jeff,
with SET STATISTICS IO ON
SELECT TV.Feature, TV.RunStatus, 100.00 * COUNT(*) / B.FeatureCount
:
GROUP BY TV.Feature, TV.RunStatus, B.FeatureCount
:
Mine above shows
Table...
December 28, 2007 at 1:41 am
The original query can be optimized as:
SELECT TV.Feature, TV.RunStatus, 100.00 * COUNT(*) / B.FeatureCount
FROM @raw AS TV
INNER JOIN (SELECT Z.Feature, FeatureCount = COUNT(*) FROM @raw Z...
December 28, 2007 at 12:41 am
December 21, 2007 at 1:40 am
They don't mean the same thing.
Try
DECLARE @T TABLE (A int, B char(1))
INSERT INTO @T SELECT 1, 'A' UNION SELECT 2, '' UNION SELECT 3, NULL
SELECT * FROM @T WHERE B...
December 21, 2007 at 1:21 am
SELECT loginname, record_date, CAST(((SELECT ((SELECT ((SELECT ((SELECT ((SELECT ((SELECT ((SELECT ((SELECT ((SELECT annual_quota FROM #pipelinehist WHERE loginname = A.loginname AND record_date = A.record_date)
/ (SELECT target_deal FROM #pipelinehist WHERE loginname =...
December 20, 2007 at 1:10 am
SELECT * FROM TempTableA A
WHERE NOT EXISTS
(SELECT * FROM TempTableB Z WHERE Z.col1 = A.col1 AND Z.col2 = A.col2 AND Z.col3 = A.col3 AND Z.col4 = A.col4)
December 5, 2007 at 11:07 pm
You are missing ' at the end of @SQLString1
December 5, 2007 at 8:00 pm
feeblemind_99 (11/20/2007)
Yeah I've changed the @Source to my table name and it works! Thanks to that...
kindly explain to me what the statement is doing from the declaration of a...
November 20, 2007 at 11:49 pm
feeblemind_99 (11/20/2007)
Anyways, can you explain to me what happens in the statement that you created?
Also, in the Insert...
November 20, 2007 at 11:32 pm
Viewing 15 posts - 1 through 15 (of 110 total)