Viewing 15 posts - 2,476 through 2,490 (of 8,731 total)
Here's another option with an additional validation for strings without digits.
SELECT col1
,LEFT( PartialString, CHARINDEX( ' ', PartialString + ' '))
FROM ...
July 20, 2016 at 8:07 am
RVarn (7/20/2016)
ALTER TABLE table_name
ADD CONSTRAINT constraint_name
CHECK (column_name condition);
Example -
ALTER TABLE employees
ADD CONSTRAINT check_value
CHECK (fieldname IN ('Y', 'N', NULL));
Example-
ALTER TABLE...
July 20, 2016 at 7:13 am
Ever thought about using a bit column?
July 20, 2016 at 6:54 am
From BOL
Installing SQL Server 2005 and SQL Server 2016 on same computer (side...
July 19, 2016 at 1:31 pm
Sean Lange (7/19/2016)
Ray K (7/19/2016)
jasona.work (7/19/2016)
You know, this was probably not a good comment, so I'm dumping it...Instead, who's going to see Star Trek this weekend!
My wife is dying to...
July 19, 2016 at 1:29 pm
July 19, 2016 at 12:31 pm
Have you checked fragmentation?
July 19, 2016 at 11:19 am
Apparently, the quotes and minus signs were modified by a word processor.
Here's a corrected version after performing 4 Replace All.
USE master
GO
PRINT '*******************************************************************************************'
PRINT '*******************************************************************************************'
PRINT '<SQL Server Instance Name>'
SELECT @@SERVERNAME
GO
PRINT '*******************************************************************************************'
PRINT '*******************************************************************************************'
PRINT...
July 19, 2016 at 9:20 am
Not a fan of Star Trek (and I guess my wife is grateful for that), so we're going to watch Ice Age instead.
July 19, 2016 at 7:34 am
JohnNash (7/19/2016)
Tweaked a bit to suit my requirement and it worked. Thank you Luis Cazares
Just be sure to understand it completely and ask any questions that you might have. 😉
July 19, 2016 at 7:08 am
Congratulations Brandie! Now ask for vacations 😀
July 19, 2016 at 6:50 am
Or the input.
Or cast the output as string, but don't do this, unless you don't plan on doing anything else with this data.
SELECT DATEADD(HOUR,-5, CAST('12:00:01' AS time)) AS cast_input,
...
July 19, 2016 at 6:45 am
shirolkar.anand (7/19/2016)
you can try with below approach-
declare @t table(Parent_ID char(1),Child_ID char(1))
insert @t values ('A','B'),('C','D'),('B','C'),('B','E'),('E','F')
select t1.Parent_ID,t1.Child_ID,isnull(t2.count+t3.t3_cnt,1) Level from @t t1 left join
(select Parent_ID,count(Child_ID)count from @t group by Parent_ID) t2
on t1.Parent_ID=t2.Parent_ID
left join...
July 19, 2016 at 6:13 am
Great, just be sure to understand it perfectly. 😉
July 18, 2016 at 2:13 pm
Viewing 15 posts - 2,476 through 2,490 (of 8,731 total)