Viewing 15 posts - 16 through 30 (of 127 total)
Thanks buddy =D
November 26, 2013 at 8:00 am
Learned a lot.
November 15, 2012 at 3:36 pm
This is the way you propose. Makes sense to initialize the object only once.
Imports System
Imports System.Data
Imports System.Data.SqlClient
Imports System.Data.SqlTypes
Imports Microsoft.SqlServer.Server
Imports System.Text.RegularExpressions
Partial Public Class UserDefinedFunctions
Private expression As New Regex("[0-9]{6,}", RegexOptions.Compiled)
...
October 19, 2012 at 8:50 am
Look, i came up with this, how do you like it?. I test the function in Winforms project but im pretty sure it will work nice in sql clr
Imports System
Imports...
October 18, 2012 at 5:20 pm
Maybe this can help litle bit, but is not exactly what you ask for.
October 18, 2012 at 4:40 pm
forget what i just said, i tested with only one row hahahah
October 18, 2012 at 4:21 pm
This one is insensitive to number order. My computer says it ran in 00:00:00:030, maybe you can tell me how it ran in yours.
;WITH t as
(
select name = '1234ABC123456XYZ67890123456789012ADS890112hhh'
),
Symbols as
(
select...
October 18, 2012 at 4:20 pm
This is other solution. My Numbers table starts with 1.
WITH t as
(
select name = '1234ABC123456XYZ67890123456789012ADS89012hhh'
),
Symbols as
(
select Symbol = substring(name,number,1), Position = Number from t join numbers on number <= len(name)
),
NumberGroups...
October 18, 2012 at 2:10 pm
This a non- recursice solution.My Numbers table starts with 1.
WITH t as
(
select name = '1234ABC123456XYZ12345678901234567890ADS'
),
Symbols as
(
select Symbol = substring(name,number,1), Position = Number from t join numbers on number <= len(name)
),
NeighborComparison...
October 18, 2012 at 12:25 pm
Marbe this helps.
UPDATE LnkCustProduct SET LnkCustProduct.CustVid = hc.CustVid
FROM SuspectRecords SR inner join hubCustomer hc on SR.SourceParentGID=hc.CustSourceGid
INNER JOIN hubProductSale HPS ON SR.SourceChildGid=HPS.ProductSourceGid AND
SR.SourceParentGID=HPS.CustSourceGid
INNER...
September 24, 2012 at 10:45 am
select count(*)
too late ha ha ha
September 24, 2012 at 9:45 am
Hi,
This is not as nice as cadavre, but is different.
DECLARE @Number AS BIGINT; SET @Number = 65432121235
SELECT ISNULL( CONVERT(VARCHAR,NULLIF(@Number/1000000000 % 1000,0))+'.','') +
ISNULL(...
August 16, 2012 at 5:55 pm
Hi again,
Here it is the TrimRight versions:
CREATE FUNCTION [dev].[TrimRightChar]
( @CharToTrim AS CHAR(1) ,
@String AS VARCHAR(MAX)
) RETURNS VARCHAR(MAX)
AS
BEGIN
-- icocks from SqlServerCentral.com and me.
RETURN LEFT(@String, DATALENGTH(RTRIM( REPLACE(@String, @CharToTrim,'...
August 16, 2012 at 9:24 am
Hi friends,
I really like both versions.
About the len function, maybe the datalength function can do the job too.
select RIGHT(@String, datalength (LTRIM( REPLACE(@String, @CharToTrim,' '))))
Thanks again for you contributions.
August 16, 2012 at 8:59 am
Viewing 15 posts - 16 through 30 (of 127 total)