Viewing 15 posts - 22,816 through 22,830 (of 59,067 total)
TomThomson (8/29/2014)
Ed Wagner (8/28/2014)
I just hope I don't become one of the people who post an answer and forget to answer the original question. 😛
Oh, that's sad - we were...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 29, 2014 at 10:17 am
Ok... your turn. Why did you need to have the Hierarchy column so that each row contained the next child and the leaf levels of the hierarchy only contained...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 29, 2014 at 10:15 am
See attached for the SQL Code.
--Jeff Moden
Change is inevitable... Change for the better is not.
August 29, 2014 at 10:13 am
First, here's the result set from my solution for this problem...
Results:
sId scode ParentID sName Hierarchy
--- ----- -------- ----- -------------------
1 11 0 ...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 29, 2014 at 10:06 am
Crud. I have the answer but my connection from work won't let me post it. I'll see if I can attach it as a file.
--Jeff Moden
Change is inevitable... Change for the better is not.
August 29, 2014 at 10:04 am
What are you using to do the import with? Bulk Insert, BCP, SSIS or ???
--Jeff Moden
Change is inevitable... Change for the better is not.
August 29, 2014 at 7:31 am
peterausger (8/29/2014)
Kindly find attached the table and the op required..Hope this info is good enough...
Thanks
Peter
Graphics are copyable/pastable to SSMS. Do like the article says. Make the code and...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 29, 2014 at 7:29 am
If you're going to be doing a fair bit of reporting on hierarchical structures, please consider the following article. It takes a bit to setup but, once in place,...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 29, 2014 at 7:15 am
peterausger (8/29/2014)
;WITH SInfo AS
(
SELECTsId
,scode
,ParentId
,sName
,CONVERT(nvarchar(800), scode) AS Hierarchy
FROMtest
WHEREParentId=0
UNIONALL
SELECTTH.sId
,TH.scode
,TH.ParentId
,TH.sName
,CONVERT(nvarchar(800), (SInfo.Hierarchy +'\' + CONVERT(nvarchar(800), TH.scode)))
FROMtest TH
INNER JOINSInfoONSInfo.sId = TH.ParentId
)
Select *...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 29, 2014 at 6:22 am
Steve Jones - SSC Editor (8/28/2014)
bump
Would you be interested in a more detailed explaination of why and how the test scripts for the "Tally OH" or the "Running Total" articles...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 28, 2014 at 2:40 pm
sqlfriends (8/28/2014)
These databases no longer has front end, their new versions are already upgraded to something new and have diffrent database names.
These are only kept for...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 28, 2014 at 12:55 pm
sqlfriends (8/28/2014)
But they want to keep the data and database, and build cubes for historical data...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 28, 2014 at 12:10 pm
I don't know for sure because I haven't used it in about 3 years but that kind of information might be in the default trace file. I know that...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 28, 2014 at 12:07 pm
David Burrows (8/28/2014)
Eirikur Eiriksson (8/27/2014)
... Guess I've been tainted by the Brits and they'r ironic sarcastic humour ...
In that case
SELECT a.steps,MIN(b.steps)
FROM #table1 a
CROSS JOIN #table1 b
WHERE...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 28, 2014 at 8:09 am
Eirikur Eiriksson (8/27/2014)
keshabsingh (8/27/2014)
This is not homework session. Your approach is very limited with hard coding the values. What if data is like this?
Then, that in itself is a change...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 27, 2014 at 7:34 pm
Viewing 15 posts - 22,816 through 22,830 (of 59,067 total)