Viewing 15 posts - 7,711 through 7,725 (of 8,731 total)
jasona.work (9/16/2013)
What happened? Nothing new in here all weekend, and it's not even any sort of a holiday anywhere (that I'm aware of at least...)
It's Independence day in Mexico...
September 16, 2013 at 7:59 am
Maybe you're trying to hard with different functions and didn't notice the splitter that Sean commented. With some replaces, it should work great for you.
SELECT MAX( CASE WHEN ItemNumber =...
September 13, 2013 at 12:20 pm
Here are two options. Be sure to understand them before using them in production.
If you have any question, feel free to ask.
UPDATE t SET
Haslift = 0
FROM #Tracking t
WHERE NOT EXISTS(...
September 13, 2013 at 10:54 am
Erland Sommarskog (9/11/2013)
ChrisM@Work (9/4/2013)
Or CROSS APPLY VALUES
Somewhat odd to use CROSS APPLY here. The normal is CROSS JOIN. Of course since there is no correlation on the right side, the...
September 11, 2013 at 4:37 pm
You can use cross tabs to accomplish this. To read more about this technique, read the following article.
http://www.sqlservercentral.com/articles/T-SQL/63681/
SELECT ID,
MAX( CASE WHEN Name = 'Description'...
September 10, 2013 at 4:13 pm
It depends on what the cursor and the SP do. To give a good advice you should give more details on what you're trying to accomplish.
September 10, 2013 at 4:09 pm
If I understand correctly, you want to show the emails that have multiple ids.
Here are 2 options. If I continue to be wrong, please explain what's the problem 🙂
WITH CTE...
September 10, 2013 at 11:53 am
Another option would be using a different approach.
select s.email,
COUNT( distinct s.id) [ids]
from dbo.j3688931 s
GROUP BY s.email
HAVING COUNT( distinct s.id) > 1
I'm just guessing here because I can't see your...
September 10, 2013 at 11:14 am
Have you tried using CHARINDEX?
WHERE CHARINDEX( ',', s1.id) > 0
September 10, 2013 at 11:11 am
You're not giving enough information.
We would be happy to help but we need you to be more explicit on what you need.
Please post the DDL for your tables and sample...
September 10, 2013 at 9:43 am
I'm not sure if this article might help you. It's a great explanation by Jeff Moden
September 10, 2013 at 9:07 am
You guys are awesome. That's why I love this site, it reminds me to think different to look for better results. 🙂
September 10, 2013 at 9:05 am
I'm not sure that's giving you the correct result. You said you need to have 6 characters on the first part and 3 on the second one. You need to...
September 9, 2013 at 3:30 pm
John.Hagen (9/9/2013)
Column 1 - 12345 should be 6...
September 9, 2013 at 2:47 pm
Just another way to do it. It should perform better than the JOIN, but I'm not sure about INTERSECT.
select product_id
from tablea a
WHERE brand_id=1
AND EXISTS(
select product_id
from tablea b
WHERE brand_id=2
AND...
September 6, 2013 at 4:36 pm
Viewing 15 posts - 7,711 through 7,725 (of 8,731 total)