Viewing 15 posts - 2,071 through 2,085 (of 2,458 total)
Bill Talada (10/24/2013)
declare @t table ( birthdate date, age as datediff(year,birthdate,getdate()) ) ;insert into @t (birthdate) values ('20000101')
select * from @t
I think this will do the trick to get someone's...
October 24, 2013 at 4:22 pm
All you need to do is change precedence constraint from Success to Completion.
October 24, 2013 at 11:16 am
I wanted to include the XML technique for this because Text1,2 & 3 all look like truncated XML (are those the actual values or did you truncate the values for...
October 24, 2013 at 11:10 am
Ok, I know this thread is old but if PatternSplitCM[/url] was available when this was posted you could do this:
DECLARE @string varchar(100)='1:1,3,5,7,4:56,43,58,5:34,67r,234';
WITH prep1 AS
(
SELECT x.ItemNumber,
ROW_NUMBER() OVER...
October 23, 2013 at 7:21 pm
From your example code it's hard to determine what you are changing the table names to. Below is a script that works without any cursors or loops to rename tables...
October 23, 2013 at 5:34 pm
I misunderstood the OP and updated my function to do what I think you are trying to do (it was originally searching for an id instead of six consecutive integers....
October 23, 2013 at 2:52 pm
Edit: misinderstood the requirement. Updated my function accordingly...
With the DelimitedSplit8K[/url] splitter function you could create an inline Table Valued function like this:
CREATE FUNCTION dbo.string_to_table(@string varchar(8000))
RETURNS TABLE
AS
RETURN
(
SELECTLEFT(item, CHARINDEX('...
October 23, 2013 at 9:56 am
There are a number of ways to do this without a cursor. Here's a great article:
Concatenating Row Values in Transact-SQL[/url]
You could use the FOR XML PATH method and rewrite...
October 23, 2013 at 8:52 am
mittensonmaui (10/22/2013)
October 22, 2013 at 3:51 pm
Just to add to what Koen said...
The only way to guarantee that rows are returned in a specific order is when ORDER BY is used.
It's also worth noting...
October 18, 2013 at 7:50 am
sqlblue (10/17/2013)
What is the best way for me to call thisstored proc in batches?
Below is an example of what I think you are trying to do. This proc will keep...
October 17, 2013 at 1:46 pm
Because you are dealing with a one-to-many parent/child node relationship you could start your query with /Root/device/sensor as your context like so:
(Taking the example code that Mark was nice enough...
October 16, 2013 at 6:04 pm
Though impossible to demonstrate without any DDL for the underlying tables it certainly does look like you can convert your function into a Inline Table Valued function (as has been...
October 16, 2013 at 5:19 pm
tomek tomek (10/16/2013)
I kind of have a solution, but it's messy (especially that I acutally have more tables like these to merge, and obviuosly there come joins with other tables).
Maybe...
October 16, 2013 at 3:05 pm
joe.wolfe (10/11/2013)
Yes, exactly....Thank you also for taking the time to respond and help...Joe Wolfe
Sorry for the late reply, I've been traveling and super-busy but have been meaning to get back...
October 16, 2013 at 9:27 am
Viewing 15 posts - 2,071 through 2,085 (of 2,458 total)