Viewing 15 posts - 346 through 360 (of 1,923 total)
Any idea of you giving us some readily consumable data to work on the query?
March 22, 2012 at 3:56 pm
Lynn Pettis (3/22/2012)
ColdCoffee (3/22/2012)
Mathew Abraham (3/22/2012)
Update D set j=s.j, k=s.k from @table_D D,@table_S s where d.i=s.i
The problem is the CROSS JOIN. why do u want to do...
March 22, 2012 at 3:48 pm
Mathew Abraham (3/22/2012)
Update D set j=s.j, k=s.k from @table_D D,@table_S s where d.i=s.i
The problem is the CROSS JOIN. why do u want to do a cross join...
March 22, 2012 at 3:34 pm
Chris Harshman (3/22/2012)
if you use CONVERT function with style 128 it seems to work, but MSDN says 128 setting is depreciated :crazy:
:crazy:
Chris Harshman (3/22/2012)
March 22, 2012 at 3:17 pm
Chris Harshman (3/22/2012)
actually I think it's the explicit conversion to FLOAT that messes up both of our solutions not any implicit conversion
Acually explicit conversion to FLOAT preserves all the decimal...
March 22, 2012 at 2:49 pm
Chris Harshman (3/22/2012)
SELECT MAX( CHARINDEX('.',REVERSE(CAST(CAST(val AS float) AS varchar(11)))) -1 )
FROM tablename
...
March 22, 2012 at 1:53 pm
Here is the algorithm (as you said you needed only directions)
1. PIVOT the #ValueList table to contain 4 columns
2. Use CROSS APPLY/OUTER APPLY to apply the pivoted table to the...
March 22, 2012 at 1:42 pm
Ouch :pinch: Implicit conversions are causing the rounding
Look at this:
declare @dec decimal(10,7)
set @dec = 1.6709999
select flt = CAST ( @dec as float)
...
March 22, 2012 at 1:18 pm
Robert klimes (3/22/2012)
declare @dec decimal(10,7)
set @dec = 87.01
select len(parsename(cast(@dec as float),1)...
March 22, 2012 at 12:44 pm
How about this?
DECLARE @Tab TABLE ( Num DECIMAL(10,7)) ;
INSERT @Tab (Num)
SELECT 87.41
UNION ALL SELECT 1.2
UNION ALL SELECT 1.0
UNION ALL SELECT...
March 22, 2012 at 12:32 pm
It is doable... but we need some input from you before we start on leading you. Please provide us readily consumable data so that we can get started, as mentioned...
March 22, 2012 at 10:20 am
How many number of rows are possible for an ID ? is it alwyas 2 or it may vary dynamically ? As Drew said, it violated 1NF, the output will...
March 22, 2012 at 9:51 am
i dont think 4 UNIONs are not required.. Try this:
; WITH CTE AS
(
SELECT Company , City, Vals , Tier , TierVals
FROM #Test T
UNPIVOT ( TierVals For Vals in (Calc1,...
March 22, 2012 at 9:46 am
Viewing 15 posts - 346 through 360 (of 1,923 total)