Viewing 15 posts - 1,066 through 1,080 (of 1,923 total)
Chris Morris-439714 (10/21/2010)
ColdCoffee (10/21/2010)
And i presume your EmpName does not have trailin/leading commas.. Else we will have to use another method.
There's a trick for that...put them in then
REPLACE(',' + EmpName...
October 21, 2010 at 10:26 am
And i must admit that my code is purely what the DelimitedSplit8K (function from Jeff Moden on splitting delimited strings) does!! So toss ur credits to Jeff Moden and the...
October 21, 2010 at 10:11 am
And i presume your EmpName does not have trailin/leading commas.. Else we will have to use another method.
October 21, 2010 at 10:06 am
Here is my version, which is 80% based on Chris' logic of using a tally table 🙂
;WITH Tens(N) AS
(
SELECT 1 UNION ALL
...
October 21, 2010 at 10:04 am
rajesh.subramanian (10/21/2010)
Hi Andrew,Can you share the link where you found the options.
here is one : http://www.sqlservercentral.com/Forums/Topic943562-338-1.aspx#bm944589
Am hunting down Paul White CLR.. will update soon...
October 21, 2010 at 10:01 am
Wayne, in ur solution, you are basing your order over ckid column (Sequence = ROW_NUMBER() OVER (ORDER BY ckid) )
What if ckid is not in a proper order ?...
October 20, 2010 at 10:50 pm
mishaluba (10/19/2010)
Wayne, THANK YOU!!! This is perfect and exactly what I was looking for. I am glad there are smart folks like you on this site!
Wayne is one...
October 20, 2010 at 12:08 am
I did not quite get your full requirement, 'cuz of the fact that, you did not
1. Provide sample data to work with
2. Give a clear visual example of your desired...
October 19, 2010 at 6:17 am
Malavika, i suggested a solution using REPLACE... that will remove the repeated data leaving only the data you require.. if there are multiple values to be replace, you can use...
October 19, 2010 at 5:57 am
If u insist in SUBSTRING funtion, then take a look at this:
SELECT
RTRIM ( LTRIM ( REPLACE (ColA, 'Microsoft SQL Server','') ) ) TrimmedString_ReplaceFn,
...
October 19, 2010 at 2:34 am
You can do something like:
SELECT RTRIM ( LTRIM ( REPLACE (ColA, 'Microsoft SQL Server','') ) ) TrimmedString
FROM
(
SELECT 'Microsoft SQL Server 2005' UNION ALL
SELECT...
October 19, 2010 at 2:30 am
Chris Morris-439714 (10/8/2010)
Note the use of derived tables rather than CTE's because it's friday.
😀 rofl :w00t:
October 8, 2010 at 3:07 am
Try this :
DECLARE @Tab TABLE
(
kunnr INT,
zterm VARCHAR(15),
cnt INT
)
INSERT INTO @Tab ( kunnr , zterm , cnt )
...
October 8, 2010 at 2:20 am
Congrats Steve, Brian and Andy!! THis site is an awesome resource... i never took SQL seriously until i had a requirement which i posted in SSC and got help from...
October 7, 2010 at 8:16 pm
There is something called "ROW_NUMBER" .. Please refer Books Online (free help that comes with SQL Server) to learn about Row_NUMBER...
September 30, 2010 at 3:40 am
Viewing 15 posts - 1,066 through 1,080 (of 1,923 total)