Viewing 15 posts - 5,671 through 5,685 (of 10,144 total)
dwain.c (9/12/2012)
...BTW Chris - Thanks for the credit!
No worries mate - so long as you keep up the repayments! 😛
September 13, 2012 at 1:44 am
A completely different method, courtesy of Dwain C:
;WITH SourceNums AS (
SELECT strcol FROM (VALUES ('1'),('2'),('5'),('7'),('8'),('9')) a (strcol)
),
nTuples (n, Tuples) AS (
SELECT 1, CAST(strcol AS...
September 12, 2012 at 9:59 am
Eugene Elutin (9/12/2012)
Cannot...
September 12, 2012 at 9:15 am
GSquared (9/12/2012)
WITH Numbers
...
September 12, 2012 at 8:54 am
There's something screwy about this - you're aggregating on pr_id but expecting the max date per id. Try isolating the part which generates data for TBL_VAL and working with it...
September 12, 2012 at 8:22 am
Anju Renjith (9/12/2012)
Step:1
CREATE TABLE tbl_Group_Test
(
_ID INT IDENTITY,
_Place VARCHAR(50),
_Name VARCHAR(100)
)
Step:2
INSERT INTO tbl_Group_Test VALUES('Tamil Nadu','Abdul Kalam')
INSERT INTO tbl_Group_Test VALUES('Tamil Nadu','Karunanidhi')
INSERT INTO tbl_Group_Test VALUES('Tamil Nadu','Jayalalitha')
INSERT INTO tbl_Group_Test VALUES('Tamil Nadu','Robin Singh')
INSERT INTO tbl_Group_Test...
September 12, 2012 at 5:26 am
ChrisM@home (9/11/2012)
If there's no index on it, then that's your problem. Each delete in SPTLog will cause a table scan of the column in SPTLogArchive to ensure that the key...
September 12, 2012 at 4:50 am
venus.pvr (9/11/2012)
No two columns should have same value within a row. With the query you provided, below is the result set:
111
222
123
124
567
8910
3NULLNULL
First two rows have same values for all the columns.
Thank...
September 11, 2012 at 10:08 am
Lynn Pettis (9/11/2012)
ChrisM@Work (9/11/2012)
oscarooko (9/11/2012)
September 11, 2012 at 9:49 am
oscarooko (9/11/2012)
September 11, 2012 at 9:40 am
SELECT
col1 = MAX(CASE WHEN seq = 1 THEN a END),
col2 = MAX(CASE WHEN seq = 2 THEN a END),
col3 = MAX(CASE WHEN seq = 3 THEN...
September 11, 2012 at 9:36 am
oscarooko (9/11/2012)
Lynn Pettis (9/11/2012)
ChrisM@Work (9/11/2012)
Lynn Pettis (9/11/2012)
ChrisM@Work (9/11/2012)
oscarooko (9/11/2012)
September 11, 2012 at 9:18 am
Lynn Pettis (9/11/2012)
ChrisM@Work (9/11/2012)
oscarooko (9/11/2012)
September 11, 2012 at 9:00 am
oscarooko (9/11/2012)
September 11, 2012 at 8:51 am
Viewing 15 posts - 5,671 through 5,685 (of 10,144 total)