Viewing 15 posts - 1,831 through 1,845 (of 2,462 total)
Eirikur Eiriksson (12/4/2014)
๐
DECLARE @ParamTable varchar(100) = N''; -- include...
-- Itzik Ben-Gan 2001
December 8, 2014 at 8:31 pm
rocky_498 (12/4/2014)
I know, I can create SQL agent job and run that job through SP sp_start_job 'JOB Name', but How I can pass variable?
Argh, I put together a longer reply...
-- Itzik Ben-Gan 2001
December 4, 2014 at 10:16 pm
-- Sample data matching what you have
DECLARE @tblCCH TABLE
(PKID int primary key,
OrderID int not null,
CCXML xml not null
);
INSERT @tblCCH
SELECT 1,31677,'<?xml version="1.0"?> <CC> <Type>4</Type> <Name><![CDATA[Lisa M. xxxxx]]></Name> <Amt>51.86</Amt>...
-- Itzik Ben-Gan 2001
December 4, 2014 at 9:05 pm
You can create a SQL agent job then create a step that executes the package. SSIS Packages are one of the options under Steps for "Type"
-- Itzik Ben-Gan 2001
December 4, 2014 at 8:45 pm
Matthias Klรคy (11/28/2014)
Thanks for this great function. One note:
SELECT * FROM dbo.PatExclude8K('123# What?!... ', '[^a-z!?.]')
returns hat?!...
So it is case sensitive, contrary to your comment in the programmers notes. I...
-- Itzik Ben-Gan 2001
December 3, 2014 at 2:04 pm
Did not know that this existed. Very cool.
-- Itzik Ben-Gan 2001
December 2, 2014 at 1:59 pm
Eirikur Eiriksson (11/6/2014)
:blush: just noticed, had several "versions", this one is no good๐
This guy here is slightly slower than the last (and fastest) version of PatExclude8K that you posted.
ALTER...
-- Itzik Ben-Gan 2001
November 6, 2014 at 3:39 pm
Eirikur Eiriksson (11/6/2014)
Alan.B (11/4/2014)
I like the idea, tinkered a little bit with the code and got the average...
-- Itzik Ben-Gan 2001
November 6, 2014 at 9:59 am
Unless I'm not understanding what you are doing you can just use ISNULL to deal with the NULLs like this:
ISNULL (<value>, 0)
-- Itzik Ben-Gan 2001
November 6, 2014 at 8:07 am
You can start here: Stairway to Integration Services[/url]. I like all the stairways but this one is particularly good.
I just finished reading:
Microsoft SQL Server 2012 Integration Services
which is...
-- Itzik Ben-Gan 2001
November 5, 2014 at 4:08 pm
Here's a function that should do the trick:
CREATE FUNCTION dbo.SubstringBetween
(
@string varchar(1000),
@searchString1 varchar(20),
@searchString2 varchar(20)
)
/*
-- example:
DECLARE
@string varchar(100) = '[atc1.123/atc2.456/atc3.789/atc4.xyz/]',
@searchString1 varchar(20) = 'atc2',
@searchString2 varchar(20) = 'atc3';
SELECT newstring
FROM dbo.SubstringBetween(@string,@searchString1,@searchString2);
*/
RETURNS TABLE AS...
-- Itzik Ben-Gan 2001
November 5, 2014 at 3:43 pm
emph. mine
g.britton (11/5/2014)
Luis Cazares (11/5/2014)
Note that those functions aren't intended for multi-character delimiters.
Well....a multi-character delimiter is just a simple pattern without wildcards. So even though that's not the design...
-- Itzik Ben-Gan 2001
November 5, 2014 at 2:18 pm
g.britton (11/5/2014)
http://www.sqlservercentral.com/articles/Tally+Table/72993/
In the comments it says:
Optimized for single character delimiter. Multi-character delimiters should be resolved externally from this...
-- Itzik Ben-Gan 2001
November 5, 2014 at 12:23 pm
Taking this one step further... Why not just replace PatExclude8K with PatReplace8k() ?:w00t:
I had to use logic from earlier in the thread but what about this for starters:
CREATE FUNCTION...
-- Itzik Ben-Gan 2001
November 4, 2014 at 8:19 pm
Eirikur Eiriksson (11/4/2014)
Just dawned on me, kind of a deja vu, here is around six years old thread on the same subject.๐
I read through this thread - very interesting...
Got me...
-- Itzik Ben-Gan 2001
November 4, 2014 at 7:45 pm
Viewing 15 posts - 1,831 through 1,845 (of 2,462 total)