Viewing 15 posts - 691 through 705 (of 1,246 total)
sks_989 - Friday, June 9, 2017 10:11 AMThanks Jason It worked.
Good deal. Glad to help. 🙂
June 9, 2017 at 10:14 am
Something like this perhaps...
DECLARE
@ColumnName sysname = 'Referral_ID',
@Value VARCHAR(10) = 12345,
@SQL VARCHAR(MAX) = '';
SELECT
@SQL = CONCAT(@SQL, 'SELECT COUNT(*) FROM...
June 9, 2017 at 10:12 am
June 9, 2017 at 9:56 am
It depends... If your data is always in that format, then yes, the SUBSTRING function is the way to go.
If the number of characters between parens can vary or...
June 9, 2017 at 9:48 am
June 9, 2017 at 9:32 am
This should do the trick...
IF OBJECT_ID('tempdb..#TestData', 'U') IS NOT NULL
DROP TABLE #TestData;
CREATE TABLE #TestData (
Column1 VARCHAR(20) NOT NULL,
Column2 DATETIME NOT...
June 2, 2017 at 1:54 pm
June 2, 2017 at 12:29 pm
Updated to handle ? characters in the original string...
Declare @string nvarchar(200)
SET @string= N'?????? No payment ashdk ?&';
SELECT REPLACE(REPLACE(CAST(REPLACE(@string, '?', '```') AS VARCHAR(200)), CHAR(63),...
June 2, 2017 at 12:09 pm
June 2, 2017 at 11:45 am
Try this...
Declare @string nvarchar(200)
SET @string= N'?????? No payment ashdk';
SELECT REPLACE(CAST(@string AS VARCHAR(200)), CHAR(63), '');
June 2, 2017 at 10:52 am
May 31, 2017 at 8:29 am
That's what I had. So this won't torpedo any Index I may have...
May 31, 2017 at 7:56 am
May 31, 2017 at 7:40 am
May 30, 2017 at 2:57 pm
Something along these lines...
USE tempdb;
GO
CREATE TABLE dbo.dim_Time (
MilTime TIME(0) NOT NULL,
DisplayTime VARCHAR(10) NOT NULL,
CONSTRAINT pk_dimTime_MilTime PRIMARY KEY CLUSTERED (MilTime)
);
May 30, 2017 at 2:10 pm
Viewing 15 posts - 691 through 705 (of 1,246 total)