Viewing 15 posts - 991 through 1,005 (of 1,923 total)
January 31, 2011 at 11:24 pm
Dave Ballantyne (1/30/2011)
Try this link http://tinyurl.com/64674ot
:-P:-D
January 30, 2011 at 10:32 pm
Ramya, sample data will be quiet useful here π
January 30, 2011 at 10:28 pm
Mike, are u sure you will be getting only 3 colors per name ?
-If yes, then we can fix the query easily.
Are there chances that u might get more...
January 30, 2011 at 10:21 pm
How about this?
select
'MonthNr' ColDesc,
max(case when f1 = '1' then cast(f1 as varchar) end) as [1],
max(case when f1 = '2' then cast(f1 as varchar) end) as [2],
max(case...
January 30, 2011 at 10:18 pm
This?
; WITH CTE AS
(
SELECT station, addate, adtime, duration, fk_stateid, fk_productid, fk_brandid,
rn = ROW_NUMBER() OVER(PARTITION BY station,substring(adtime,1,5) ORDER BY (SELECT 0))
FROM tbl_radio
)
SELECT station, addate, adtime, duration,...
January 27, 2011 at 3:20 am
This ?
SELECT
CASE WHEN KL_EQUIPMENT_TYPE_CD = '20D86' THEN EQ_CNT END AS [20DRY] ,
CASE WHEN KL_EQUIPMENT_TYPE_CD = '40D86' THEN EQ_CNT END AS [40DRY]...
January 27, 2011 at 3:16 am
Try this:
SELECT
[20D86] AS [20DRY] ,
[40D86] AS [40DRY] ,
[40D96] AS [40DHC] ,
[45D96] AS [45DRY]...
January 27, 2011 at 2:23 am
Can you post your expected result of that sample data ? i am finding it quite hard to understand your requirement..
January 27, 2011 at 2:17 am
Thanks for this cute Spackle,Jeff π
January 26, 2011 at 11:01 pm
Try this :
; WITH Grouper AS
(
SELECT NM.Name , Clr.Color ,
RN = ROW_NUMBER() OVER(PARTITION BY Clr.Name_ID ORDER BY (SELECT 0))
FROM Name NM
INNER JOIN Colors Clr
ON NM.Name_ID...
January 26, 2011 at 10:33 pm
I feel this is a straight forward answer ; we can understand the intricacies of the problem only if u post sample data.
For the meantime, you can have this:
SELECT NM.Name...
January 26, 2011 at 8:01 pm
Also i suggest you read thro the following article from one of the Masters of SQL,Mr.Jeff Moden..
January 26, 2011 at 11:11 am
Viewing 15 posts - 991 through 1,005 (of 1,923 total)