Viewing 15 posts - 6,406 through 6,420 (of 8,731 total)
Alvin,
The code makes clear that there's a concatenation based on multiple values on a single column.
CASE WHEN A.[COL_1] LIKE '%cricket%' THEN 'ck' + ',' ELSE '' END +
CASE WHEN...
May 27, 2014 at 4:14 pm
I agree, a redesign to normalize the tables should help you solve this and other issues.
May 27, 2014 at 3:31 pm
I can't see why would you want to use COALESCE as you're not evaluating nulls.
May 27, 2014 at 2:15 pm
Something like this?
DECLARE @date = '20140701'
SELECT TOP 1 *
FROM MarketShare
WHERE StartDate <= @date
ORDER BY StartDate DESC
May 27, 2014 at 1:13 pm
Don't be so sure about the control that you expect by the limit on the ID. The rows are still being generated and you can easily check it with the...
May 27, 2014 at 1:07 pm
You need to use brackets.
DAY([DATE_ACTIVATION])
That should help with the error.
May 27, 2014 at 11:06 am
I forgot to mention. Thank you for the article Ed. It's nice,I wish that I could use it more, but we haven't migrated to 2012 (or 2014). I have to...
May 27, 2014 at 9:10 am
Pedro Gomes-379488 (5/27/2014)
May 27, 2014 at 8:39 am
This is a possible solution but I'm not sure that it will work as it is for your data because I can't test it. This won't need a calendar table...
May 27, 2014 at 8:28 am
Hi,
This sounds relatively simple, but there's a problem. We need something to work with. Please post DDL, sample data (as insert statements) and expected output based on the sample data.
Read...
May 26, 2014 at 4:06 pm
Have you tried pressing F1 and looking for REPLACE? You should get to this nice article:
http://msdn.microsoft.com/en-us/library/ms186862(v=sql.110).aspx
May 26, 2014 at 11:55 am
Answer in the following thread:
http://www.sqlservercentral.com/Forums/Topic1574051-3077-1.aspx
May 26, 2014 at 8:25 am
The alternative could be the official unpivot.
SELECT Val
FROM (SELECT CAST( '1 cod ' + CAST( cod AS varchar(10)) AS varchar(20)) col1,
...
May 26, 2014 at 8:23 am
Maybe you didn't play enough with bcp. This article might help you.http://sqlsouth.wordpress.com/2014/05/23/export-xml-from-sql-server-using-bcp/
May 24, 2014 at 6:39 am
Viewing 15 posts - 6,406 through 6,420 (of 8,731 total)