Viewing 15 posts - 6,121 through 6,135 (of 14,953 total)
Since it looks like you're using SQL 2005, based on the forum you posted in, the easiest and most secure way to do that is via a CLR stored procedure....
November 11, 2010 at 6:30 am
Try something like this out, see if it does what you need:
IF OBJECT_ID(N'tempdb..#T') IS NOT NULL
DROP TABLE #T;
CREATE TABLE #T (
ID INT IDENTITY PRIMARY KEY,
ParentID INT NULL);
INSERT INTO #T (ParentID)
SELECT...
November 11, 2010 at 6:27 am
Henrico Bekker (11/11/2010)
can someone try the following please?
create a small db in 2011, set compat mode to 2008, back up, try to restore in 2008, see...
November 11, 2010 at 6:21 am
Use a recursive CTE to crawl the hierarchy (Books Online has an example of how to do this), and retain the top level ParentID as a third column in it....
November 10, 2010 at 2:13 pm
I broke it down into pieces. See if this helps:
declare @text varchar(250)
set @text = 'Login succeeded for user ''domain\user''. Connection made using Windows authentication. [CLIENT: xxx.xxx.xxx.xxx]'
SELECT @text,
CHARINDEX('''', @text, 0),
CHARINDEX('.',...
November 10, 2010 at 1:49 pm
You're welcome.
Keep in mind that the math I did on it only works if the numbers are integers. Otherwise, you have to convert to integers before you divide, or...
November 10, 2010 at 1:37 pm
Kevin Hood (11/10/2010)
The true test of an automated driving system will be how it responds when a squirrel runs onto the road.
Or someone's kid.
November 10, 2010 at 1:31 pm
It's essentially the conversion from logical data model to a physical data model, so far as I understand it. Beyond that, it's all details.
November 10, 2010 at 1:26 pm
The recursive UNION in your insert crashed SSMS for me. Might want to edit that out.
Does this do what you need:
SELECT EMP,
SUM(CAST(SUBSTRING(TRANSTME, 1, 3) AS INT)) + SUM(CAST(SUBSTRING(TRANSTME, 4,...
November 10, 2010 at 1:22 pm
I'm not clear on what you want. Can you show an example?
November 10, 2010 at 1:09 pm
Viewing 15 posts - 6,121 through 6,135 (of 14,953 total)