Viewing 15 posts - 376 through 390 (of 475 total)
Hi
Here's a couple of articles by Jeff Moden on the subject
http://www.sqlservercentral.com/articles/T-SQL/63681/
http://www.sqlservercentral.com/articles/Crosstab/65048/
They should help
March 17, 2013 at 12:19 pm
ahmedhussein874 (3/14/2013)
Thanks a lot Micky .. Less Code ..Amazing + Perfect +That is what i want (y)
You're welcome
March 14, 2013 at 2:17 pm
Steven Willis (3/14/2013)
March 14, 2013 at 1:57 pm
Hi
This seems to work, but would need some serious testing I think.
;WITH data as (
SELECT * FROM (VALUES
(null,null ,null , 'Egypt' )
,(null,null , 'Alexandria', 'Egypt')
,(null, 'East', 'Alexandria', 'Egypt')
,(null,...
March 14, 2013 at 12:58 pm
Your welcome
March 11, 2013 at 11:55 am
kwalter 22547 (3/10/2013)
March 10, 2013 at 6:55 pm
Hi
Jeff Moden has this excellent article on hierarchies
http://www.sqlservercentral.com/articles/Hierarchy/94040/
I suspect the creating a hybrid sort path will help you with the ordering.
;with Menu as (
SELECT * FROM (
VALUES
('100','Main Menu','',1)
,('200','Sales Management','100',1)
,('300','Customer...
March 10, 2013 at 1:08 pm
ChrisM@Work (3/7/2013)
March 7, 2013 at 11:07 am
sqlislife (3/7/2013)
Can you clarify this statement. I think it contains some special characters
SELECT COUNT(*) + 1 FROM #temp1 WHERE DataDifference...
March 7, 2013 at 11:05 am
Hi
The third example you gave doesn't appear to conform with the rules use on the other examples. I would have expect 4 based on the previous examples
Example 1
N,1,1,3,1,1,4,1
1---->2---->3->
Example 2
N,1,1,3,1,1,1,1
1---->2------->
Example
N,3,3,1,1,1,6,1
1>2>3------>4->
If...
March 6, 2013 at 7:39 pm
Hi Craig
I've had a go with your example data using the following and it appears to do what you require ... well the removing of empty tiers
I hope it works...
March 3, 2013 at 1:34 pm
Can you post the function you created?
February 27, 2013 at 11:11 pm
Why? Please don't say "for performance reasons" until you've actually tested it. I tested all of the solutions offered so far and there's virtually no difference. Try...
February 27, 2013 at 10:43 pm
Try
UPDATE table.Statements
SET field03 = REPLACE(LTRIM(REPLACE(field03, '0', ' ')), ' ', '0')
WHERE field03 like '0%'
This will only try to update where field03 starts with a 0. An index on...
February 27, 2013 at 7:02 pm
Essentially what it is doing is, using the long string as an example.
Take the length of the text and divide it by 15 and add one. This gives us...
February 27, 2013 at 12:57 pm
Viewing 15 posts - 376 through 390 (of 475 total)