Viewing 15 posts - 16 through 30 (of 1,922 total)
dwain.c (7/24/2013)
ColdCoffee (7/24/2013)
July 24, 2013 at 1:04 am
Glad that it worked. I hope you understand the power of providing ready-to-use sample data. It makes the life of forum members a lot easier to work on the solution...
July 24, 2013 at 12:32 am
Hi Nakul,
NIce solution. But one thing. That solution works only for the input data provided by the OP. Try your query on this sample set and u'll notice the result...
July 23, 2013 at 12:38 am
Hi ,
a little help in setting up the sample could have helped a lot. Like this:
IF OBJECT_ID('tempdb..#TableA') IS NOT NULL
DROP TABLE #TableA
IF OBJECT_ID('tempdb..#Tableb') IS NOT NULL
DROP TABLE #TableB
CREATE TABLE...
July 23, 2013 at 12:26 am
That is because you are SETting the value for your variable before the SELECT statment..
SET @MyNumberReturn = '000000'
You code should be
IF @MyNumberReturn = '000000' OR @MyNumberReturn IS NULL
THEN
...
October 1, 2012 at 4:49 pm
Like this?
SELECT TD.ID
,Attrib1 = CASE WHEN MIN(TD.Attr1) <> MAX(TD.Attr1) THEN NULL
...
September 18, 2012 at 12:44 pm
For ID = 3, the answer should be 2 not 3, right?
September 10, 2012 at 7:48 pm
Try NUMERIC(8,4).
September 10, 2012 at 3:22 pm
This?
DECLARE @tab TABLE
(
Value DECIMAL (14,7)
)
INSERT INTO @tab (Value)
SELECT 0008.22816 -->> 0000008.0022816
UNION ALL SELECT...
August 7, 2012 at 11:27 am
You said grouping, but the output shows replicating the existing information? Did you really mean that or am I missing something?
August 6, 2012 at 10:24 am
dji (8/3/2012)
August 3, 2012 at 1:20 pm
This is the simplest way, but i sense may not be the most efficient way. Let me see if there is another way to tackle this.
August 1, 2012 at 1:57 pm
Gotcha!
Here is what you are looking for:
SELECT *
FROM #tTable1 OtrTbl
OUTER APPLY
(
...
August 1, 2012 at 1:31 pm
Good job posting almost 90% of the information required..
ONe question: WHats the logic behind the expected reuslt?
August 1, 2012 at 1:13 pm
Viewing 15 posts - 16 through 30 (of 1,922 total)