Viewing 15 posts - 33,766 through 33,780 (of 59,099 total)
GSquared (6/3/2011)
I'd change that "LIKE" statement to something a little more REGEX-ish.
CREATE TABLE #T (DT CHAR(10))
INSERT INTO #T (DT)
VALUES ('1/1/11'),('01/01/2011'),('1.1.11'),('1-1-11'),('Bob');
SELECT *
FROM #T
WHERE DT LIKE '%[/.[-]]%[/.[-]]%';
Wouldn't that allow for things that...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 4, 2011 at 12:50 am
Jnrstevej (6/2/2011)
Brilliant i can work with that
My recommendation is that you don't so that you don't get into any bad habits. If you have one, format the dates in...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 4, 2011 at 12:00 am
As a bit of a sidebar, here's a blanket statement...
[font="Arial Black"]NEVER EVER USE A RECURSIVE CTE TO BUILD SEQUENTIAL SETS OF NUMBERS NO MATTER HOW SMALL THE SET MAY BE!!!...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 3, 2011 at 11:50 pm
skcadavre (6/3/2011)
--Jeff Moden
Change is inevitable... Change for the better is not.
June 3, 2011 at 11:17 pm
tfifield (6/3/2011)
Jeff Moden (5/24/2011)
sqlnaive (5/24/2011)
--Jeff Moden
Change is inevitable... Change for the better is not.
June 3, 2011 at 4:06 pm
WayneS (6/3/2011)
Just received a wonderful PM... someone thanking me for the help I'm doing... for someone else!
Those are the best and welcome anytime. They can turn an otherwise bad...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 3, 2011 at 3:57 pm
Bill Tidwell (6/3/2011)
--Jeff Moden
Change is inevitable... Change for the better is not.
June 3, 2011 at 3:50 pm
I've found that reinstalling SQL Server every 120 days is a real PITA. 😛
--Jeff Moden
Change is inevitable... Change for the better is not.
June 3, 2011 at 12:53 am
I've found that most people are doing the wrong thing by simply increasing the timeout. Do you really want the users to wait for more than 20 seconds? ...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 2, 2011 at 5:08 pm
Bill Tidwell (6/2/2011)
--Jeff Moden
Change is inevitable... Change for the better is not.
June 2, 2011 at 4:55 pm
If you have a computer at home then...
Step 1. Buy the Developer's Edition of SQL Server. It only costs about $45-50 USD and is the equivalent of the...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 2, 2011 at 4:52 pm
jcrawf02 (6/2/2011)
--Jeff Moden
Change is inevitable... Change for the better is not.
June 2, 2011 at 4:31 pm
Yes, at the very least. That's correct for when the "numeric" date format is unknown. If you have dates like '1 Jan 2011' or 'January 1st, 2001' (etc),...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 2, 2011 at 4:21 pm
jarid.lawson (6/2/2011)
--Jeff Moden
Change is inevitable... Change for the better is not.
June 2, 2011 at 7:59 am
thomas.bassett (6/1/2011)
Declare @InFoodID int
SET @InFoodID = 2
SELECT
AnimalFood.FoodID, Animal.AnimalName
FROM
AnimalFood INNER JOIN
Animal ON AnimalFood.AnimalID = Animal.AnimalID
WHERE
...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 1, 2011 at 11:27 pm
Viewing 15 posts - 33,766 through 33,780 (of 59,099 total)