Viewing 15 posts - 1,786 through 1,800 (of 8,731 total)
Here's an option using an inline table-valued function which would perform a lot better than a normal function. It also has a test to show how does it work.
The code...
December 2, 2016 at 12:54 pm
fabriziodb (12/2/2016)
CELKO (11/30/2016)
``
I never heard this term before, and I wrote the standards. I think you...
December 2, 2016 at 8:53 am
SQLsharp has a validation for credit cards. It will only validate a number and won't extract it from a string. If you want to try it, feel free to do...
December 2, 2016 at 7:36 am
WebTechie (12/1/2016)
Luis,I followed all of that up to "use the File Connection as the source".
I'm not sure where you are setting the source to be the file connection?
Thanks.
Tony
I'm sorry, I...
December 1, 2016 at 1:19 pm
Lynn Pettis (12/1/2016)
I stayed away and thinking I will bypass him...
December 1, 2016 at 1:12 pm
You could have also changed it like this and keep it as a function with zero reads.
CREATE FUNCTION [dbo].[PatternSplitCM](@List [varchar](8000) = NULL, @Pattern [varchar](50))
RETURNS TABLE WITH SCHEMABINDING
AS
RETURN
...
December 1, 2016 at 1:06 pm
whenriksen (12/1/2016)
SELECT @Dummy = CASE WHEN LEN( Med_Rec_Nbr ) < 7
THEN...
December 1, 2016 at 11:36 am
How can you differentiate it from the visa card that has the expiration date together?
Here's another option that works with your sample data. The function is posted and explained in...
December 1, 2016 at 11:34 am
This might give invalid card numbers, but it's worth a try.
WITH ctePatterns AS(
SELECT *
FROM (VALUES
( '%[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]%', 16)
,(...
December 1, 2016 at 11:11 am
You should also read this article to avoid looping in SQL.
December 1, 2016 at 11:01 am
whenriksen (12/1/2016)
SELECT ps.Med_Rec_Nbr, REPLACE(STR(ps.Med_Rec_Nbr,7),' ','0')
FROM @Primary_Summary AS ps
This approach also makes it obvious if you got a number larger than expected, rather than truncating to 7 characters.
It's also slower. It's...
December 1, 2016 at 10:48 am
Talvin Singh (12/1/2016)
oh cr*p, that has worked!!!so ORDER BY NEWID() is a random function?
It's not a random function, but it creates a random value which is designed to be a...
December 1, 2016 at 10:29 am
Kill all connections. 😀
December 1, 2016 at 10:26 am
To download 115MB in 200 seconds is the same that downloading 117,760KB in 200 seconds. If you divide the number of KB by the seconds, you'll get the KBs needed...
December 1, 2016 at 10:04 am
Welsh Corgi (12/1/2016)
I just ask for guidance.I think that it is pretty clear what I want.
I'm sure that you've been guided to this article before, but this is an example...
December 1, 2016 at 9:39 am
Viewing 15 posts - 1,786 through 1,800 (of 8,731 total)