Viewing 15 posts - 76 through 90 (of 1,922 total)
Something like thiss?
DECLARE @InstlNo INT = 15
DECLARE @TBL_INTRATE TABLE
(
SCHEMEID INT
,INSTLNO INT
,ROI INT
)
INSERT INTO @TBL_INTRATE
SELECT 1, 1, 20
UNION ALL SELECT 1,...
July 5, 2012 at 11:58 am
Please provide some sample data, table structure, business rules and expected result, like this format:
Data:
IF OBJECT_ID('tempdb..#t') IS NOT NULL
DROP TABLE #t
CREATE TABLE #T
(
ColA INT
...
July 3, 2012 at 1:51 pm
Jeff Moden (7/1/2012)
ColdCoffee (6/29/2012)
I would invlove an Regex-powered CLR for this task. Simple, powerfull and nasty fast.
If it were me, I wouldn't bother with the CLR for this task because...
July 1, 2012 at 11:17 am
I would invlove an Regex-powered CLR for this task. Simple, powerfull and nasty fast.
June 29, 2012 at 5:24 pm
_simon_ (6/29/2012)
The row_number function with partition by is incorrect because it continues with counting instead of starting it over again when the user changes.
My query produces the exact same output...
June 29, 2012 at 9:40 am
This, perhaps?
; with cte as
(
select *
, rn1 = ROW_NUMBER() over(Order by ot.code)
...
June 29, 2012 at 1:27 am
Or this?
SELECT REVERSE( LEFT (crsapp.r , CHARINDEX('_', crsapp.r)-1))
from #testtable t
CROSS APPLY ( SELECT t.ProdPath + '\' ) P(ProdPath)
CROSS APPLY ( SELECT REVERSE ( SUBSTRING(P.ProdPath, 2, CHARINDEX('\',P.ProdPath,2)-2 ) )...
June 27, 2012 at 10:40 pm
This?
SELECT MyId ,MinAmt = MIN( Pivot_Handle.Vals )
FROM #test T
UNPIVOT ( Vals FOR Cols IN (MV1 , MV2, MV3, MV4)) Pivot_Handle
WHERE Pivot_Handle.Vals >= 150
GROUP BY MYID...
June 24, 2012 at 10:00 pm
This?
DECLARE @ReadingTable TABLE
(
Name VARCHAR(100)
,RED VARCHAR(100)
,BLUE ...
June 19, 2012 at 3:37 pm
Hello Marshy100,
Welcome to SSC. I see that you are fairly new to the site. For getting best results for your question, please read the following article on the etiquettes.
June 19, 2012 at 3:03 pm
This?
DECLARE @String VARCHAR(100)
,@CharToFind VARCHAR(1)
SET @String = 'AAAA BBBCB NNNNN NEEEEE ERERERERERE '
SET @CharToFind = ' '
SELECT CountOfCharsInTheString = DATALENGTH...
June 19, 2012 at 1:53 pm
As an example:
IF OBJECT_ID('TempDB..#Temp') IS NOT NULL
DROP TABLE #Temp;
CREATE TABLE #Temp
(
iD INT IDENTITY(1,1)
...
June 19, 2012 at 11:23 am
I am not sure what the requirement is, but with the look of things, i sense that you need find the ID whose sum of quantity equals or greater than...
June 19, 2012 at 11:11 am
I think i understood the requirement, but hey, i may be terribly misinformed :w00t:
So, lets cook some sample data (you said 5 rows, ALWAYS)
IF OBJECT_ID('tempdb..#Test') IS NOT NULL
DROP TABLE #Test;
CREATE...
June 18, 2012 at 10:55 am
Viewing 15 posts - 76 through 90 (of 1,922 total)