Viewing 15 posts - 5,026 through 5,040 (of 15,381 total)
Or if you don't need the flexibility of a calendar table (which is probably what I would use) and you don't care about holidays you could do some simple date...
May 1, 2014 at 1:47 pm
Eirikur Eiriksson (5/1/2014)
😎
with p as
(
select 'asdf1234' as Delivery_Site union all
select 'asdf 1234' union all
select ' asdf asdf ' union all
select ''
)
,TXT_INFO AS
(
SELECT
...
May 1, 2014 at 12:23 pm
Just an fyi...the code you posted is what is known as a multi statement table valued function (mstvf). These are very poor performers. In fact, a typical scalar function or...
May 1, 2014 at 12:09 pm
Steve Jones - SSC Editor (5/1/2014)
Can someone do me a favor and try to edit a few of their own posts?got a report of a bug here: http://www.sqlservercentral.com/Forums/Topic1566649-433-1.aspx?Update=1
See my reply...
May 1, 2014 at 10:36 am
Steve Jones - SSC Editor (5/1/2014)
All your posts should be editable by you only and I use this button at least weekly....
May 1, 2014 at 10:36 am
Eirikur Eiriksson (5/1/2014)
Why not try Jeff Moden's splitter, pass space as delimiter?😎
Try it...
with p AS
(
SELECT 'asdf12345678901' AS Delivery_Site UNION
SELECT 'asd f 234 ...
May 1, 2014 at 10:25 am
gbritton1 (5/1/2014)
Here's an approach using Chris Morris Pattern Splitter:
select Delivery_Site, firstword.Item
from p
cross apply (
select top 1 * from dbo.PatternSplitCM(Delivery_Site, '%[a-z0-9]%')
where Matched = 1
order by ItemNumber
) firstword
This certainly works but I...
May 1, 2014 at 10:18 am
Good catch below86. The introduction of multiple spaces really messes up that code I posted.
Some people do have problems posting code. It is often their firewall that prevents it. At...
May 1, 2014 at 10:15 am
Two major issues with the way you are writing this. The first and the biggest issue is this is wide open to sql injection. You should NEVER directly execute a...
May 1, 2014 at 7:40 am
I would think that it is actually slower. Both truncate and drop will deallocate pages. These page deallocations are what is logged in a truncate and a drop. This basically...
May 1, 2014 at 7:34 am
jdk77 (5/1/2014)
I have a C# solution with many parameterized sql queries.
I would like to be able to add optimizations to these in a centralized way.
For the sake of simplicity, let's...
May 1, 2014 at 7:30 am
dhechle (4/30/2014)
April 30, 2014 at 3:17 pm
SQL Guy 1 (4/30/2014)
DECLARE @stmt NVARCHAR(MAX)=
'use DBApps
GO
CREATE SCHEMA Obsolete...
April 30, 2014 at 3:14 pm
Bill Talada (4/30/2014)
April 30, 2014 at 2:07 pm
sharonsql2013 (4/30/2014)
No Worries, Found a Link that helped.LTRIM(LEFT(p.Delivery_Site, CHARINDEX(' ',p.Delivery_Site)))
I don't think that will actually work in all situations.
with p as
(
select 'asdf1234' as Delivery_Site union all
select 'asdf 1234' union all
select...
April 30, 2014 at 1:11 pm
Viewing 15 posts - 5,026 through 5,040 (of 15,381 total)