Viewing 15 posts - 16 through 30 (of 128 total)
Sometimes, initials can be a problem. My parents didn't consider mine. This lead to me, as a second grader, knocking the top two front (permanent) teeth from a bigger, third-grader's...
October 28, 2013 at 3:43 pm
Sean Lange (9/5/2013)
--begin edit--
IIF was added to SQL 2012 :angry:
--end edit--
The first statement would be something like this:
SELECT case Field1 when NULL then 'NULL'...
September 6, 2013 at 1:07 pm
I'm not clearing my cookies, either, but this is a work machine, so there is likely to be a policy in place. Haven't been able to check on that, yet.
August 2, 2013 at 3:34 pm
Well, not knowingly. I'll check to see if a new policy has been implemented here. Thanks for the response.
August 2, 2013 at 12:15 pm
Off the top of my head...
In the ORDER BY clause, immediately before the 'MyDate' column, add this CASE statement:
CASE WHEN MyDate IS NOT NULL THEN 1 ELSE 2 END
That will...
June 14, 2013 at 7:47 am
Since you are running a SQL Server Agent job, you can use SQL Server Agent tokens.
The one for date the Job started running is: $(ESCAPE_NONE(STRTDT))
Here's a link to the...
February 21, 2013 at 3:30 pm
You keep mentioning the 'initial size'. That only matters at the beginning. How big was the log when the failed increase was attempted? 10 percent of *that* amount is what...
February 14, 2013 at 11:20 am
Thank you, Scott! With the addition of a WHERE clause on the first SELECT, I end up with an empty table without a IDENTITY property, which is EXACTLY what I...
January 3, 2013 at 9:22 am
Thanks Jeff. I was hoping for something which could use "SELECT *", so knowledge about the extant columns wouldn't be necessary. Neat technique, though, if the column names and the...
December 27, 2012 at 8:53 am
I want a clone of the table (with 3 addition, preceeding, columns), with the original column sequence, if possible. I'd rather not have to resort to dynamic SQL to define...
December 27, 2012 at 8:41 am
You can have as many 'duplicate foreign keys' as there are rows in the table. It is just a value, after all. It appears that you were actually talking about...
October 23, 2012 at 8:37 am
Actually, the date rounds up from noon, onwards, not just after noon.
October 2, 2012 at 7:55 am
@@ROWCOUNT refers to the number of rows affected by the immediately-previous SQL statement. If you have any activity (like a SET statement, or an IF clause) between the statement you...
March 26, 2012 at 8:47 am
As far as the contents of a function, or stored procedure, it would seem that the LIKE comparison operator is what you need.
CASE
WHEN SSSNO LIKE '[0-9][0-9][0-9][-][0-9][0-9][-][0-9][0-9][0-9][0-9]'
THEN 'valid'
ELSE 'invalid'
END
January 13, 2012 at 1:48 pm
When the Attachment column was created, the ANSI_PADDING setting was most likely 'OFF'. This causes trailing blanks to be automatically trimmed from varchar and nvarchar columns. The same thing happens...
October 25, 2011 at 2:32 pm
Viewing 15 posts - 16 through 30 (of 128 total)