Viewing 15 posts - 1,381 through 1,395 (of 1,923 total)
I am unclear of the requirement , friend! Can you please follow the instructions on this article and provide with a better question and a clear desired-result, it would be...
June 15, 2010 at 6:14 am
It all depends on your SET_ANSI_NULLS setting..
but for starters i give u this:
-- NULL COUNT
SELECT COUNT(*) FROM TABLE
WHERE COLUMN IS NULL
-- NOT NULL COUNT
SELECT COUNT(*) FROM TABLE
WHERE COLUMN IS NOT...
June 14, 2010 at 6:49 am
Walter, your SET statement must come before the DECLARE CURSOR
Like:
set @searchname = 'TTDSLS951100'
declare mycurs cursor...
June 10, 2010 at 3:08 am
Azzu, here are some links describing APPLY clause ; all the qustions you asked is explained in detail in the link ; i had given the link to the first...
June 10, 2010 at 12:55 am
I guess, every recursive CTE must contain a primary anchor select, an UNION ALL and a secondary clause that will reference the name of the CTE.. recursion happens this way...
June 10, 2010 at 12:52 am
Hey there, try this:
;WITH
duplicate (a, b,c) AS
(
SELECT isnull(a, '*') a , isnull(b, '*') b , count(*) c
FROM dbo.t
GROUP
BY a, b
)
SELECT t.a, t.b
FROM dbo.t t
left join duplicate d
on isnull(t.a,...
June 10, 2010 at 12:43 am
Got a question bro, do we have to retain only the first occurence of a duplicated character in that string?
June 9, 2010 at 2:58 am
ColdCoffee (6/8/2010)
and post data in readily consumable format, so that every one will give it a shot..
see as i was saying this, and as there was sample data in readily...
June 8, 2010 at 5:00 am
Jan Van der Eecken (6/8/2010)
Why make it that complicated?
SELECT FatherId, MAX ( age ) AS 'age'
FROM @Fathers
GROUP BY FatherId
Or am I missing something?
Jan Van , think u probably missed...
June 8, 2010 at 4:34 am
As this is fairly simple to construct, i myself created the sample data and scripts and the code.. in future, u can follow what Jan Van said and post data...
June 8, 2010 at 3:38 am
Hey there, try this :
DECLARE @Fathers TABLE (FatherId VARCHAR(10), age INT)
INSERT INTO @Fathers
SELECT 'Father1', 12
UNION ALL SELECT 'Father1', 17
UNION...
June 8, 2010 at 3:36 am
I really cant understand your request, Lucky! Please provide us sample data, sample tables and a clear-desired result.. Please read thro this article on how to post data so that...
June 7, 2010 at 11:10 pm
Hey there, Whats the relation between ABC and XYZ ?
June 7, 2010 at 10:37 pm
My cent is on the SQL Server Profiler.. THis will clearly let you know the exaclt T-SQL statement being run.. I am not big-shot in Profiler, so probably our other...
June 7, 2010 at 7:43 am
skcadavre (6/7/2010)
ColdCoffee (6/7/2010)
skcadavre (6/7/2010)
ColdCoffee (6/7/2010)
June 7, 2010 at 5:31 am
Viewing 15 posts - 1,381 through 1,395 (of 1,923 total)