Viewing 15 posts - 4,621 through 4,635 (of 9,643 total)
Either of these should work, depends on your preference for placement of aliases:
SELECT
MyField02= CASE
WHEN (Right(MyField,2)*1)=7 THEN '999'
WHEN (Right(MyField,2)*1)7 THEN '888'
ELSE NULL
END
FROM
MyTable
SELECT
CASE
WHEN (Right(MyField,2)*1)=7 THEN '999'
WHEN (Right(MyField,2)*1)7...
July 24, 2009 at 1:09 pm
Since you don't have any wildcards defined in the one using NOT LIKE, I would think that the optimzer would evaluate them the same, but as Gail said, "Try it...
July 24, 2009 at 1:00 pm
Let me see if I understand the problem. You have an AD group, let's call it ProdDBAs, which has sysadmin rights on your SQL Servers and the concern is...
July 24, 2009 at 12:53 pm
So are trying to update the data in the table or trying to output a column named myfield02 in a result set?
July 24, 2009 at 12:48 pm
You certainly can remove them all, but I don't know that you should. You can manage your SQL Server so that you just use SQL Logins or just use...
July 24, 2009 at 12:12 pm
Forgot to comment on the Amazon issue. Amazon put themselves into a tough spot by allowing these books to be uploaded and then came across as heavy-handed in their...
July 24, 2009 at 12:02 pm
I have no idea how many books I read in a year, probably anywhere from 20-50. I should start keeping a list. I have to admit that I...
July 24, 2009 at 11:57 am
You don't need the MyField = in the THEN portion you just need the value.
SELECT
CASE WHEN (Right(MyField,2)*1)=7 THEN '999' END,
CASE WHEN (Right(MyField,2)*1)7 THEN '888' END
FROM MyTable
July 24, 2009 at 11:40 am
Jan Van der Eecken (7/24/2009)
July 24, 2009 at 10:51 am
Mr. ".", I had the first 2 books and just checked my library and they are no longer with me. You can get them on Amazon though. I...
July 24, 2009 at 10:49 am
The Mad Scientist Club, fantastic! I had those books and forgot. Will be checking to see if the local library has them for my kids! Another good...
July 24, 2009 at 10:17 am
What is vdn? I don't see it in the select list anywhere.
I think you'll be better off by moving the filtering on vdn to the WHERE clause, and I...
July 24, 2009 at 10:13 am
I loved King's earlier stuff and I loved the Gunslinger series (actually it's called The Dark Tower) until the ending. The way he ended it really sucked. My...
July 24, 2009 at 9:44 am
Can you post the table definition (Create table) and some sample data? Maybe just the "1000" rows. I'm thinking it may have something to do with the way...
July 24, 2009 at 9:26 am
Can you post your table definition? What data type is starttime?
July 24, 2009 at 8:55 am
Viewing 15 posts - 4,621 through 4,635 (of 9,643 total)