Viewing 15 posts - 7,051 through 7,065 (of 8,731 total)
It's more like:
SELECT fname, lname, MAX(location1), MAX(location2)
FROM #Something
GROUP BY fname, lname
January 31, 2014 at 2:20 pm
Please don't post on multiple forums.
All replies in this thread: http://www.sqlservercentral.com/Forums/Topic1536945-3077-1.aspx
January 31, 2014 at 1:19 pm
You can add a derived column on the table with a formula as used below:
WITH SampleData([Year], [Month], Productname ) AS(
SELECT '2013', '11', 'ACB' UNION ALL
SELECT '2013', '11', 'CDE'
)
SELECT...
January 31, 2014 at 1:19 pm
You're welcome. I hope you understand how it works. If you don't, please post any questions that you have.
January 31, 2014 at 12:17 pm
There's an easier way and it's explained in this article: http://www.sqlservercentral.com/articles/T-SQL/63681/
This is an example that might not work because I have nothing to test on.
-- Daily Report
SELECT UserID,
SUM(CASE WHEN...
January 31, 2014 at 11:09 am
The best splitter for T-SQL is right here[/url] along with several tests. It will outperform any splitter using while loops or xml.
With it, you can replace your function to this....
January 31, 2014 at 10:23 am
Sean Lange (1/31/2014)
VoldemarG (1/31/2014)
2) where databasename ='myDBname'...
January 31, 2014 at 9:49 am
Do you really need to do this in T-SQL? This is usually made in the front end.
If it's completely needed on T-SQL, you might need to union the detail with...
January 31, 2014 at 9:20 am
Sure, there's a different way to achieve it. I personally prefer the CROSS TABS method for pivoting data.
Here's an example. If you have questions, feel free to ask.
WITH CTE AS(
SELECT...
January 31, 2014 at 8:44 am
Chris, I think you were expecting different results than the ones the OP asked for.
I would go for the last query from o.fimin.
January 31, 2014 at 8:33 am
Define "does not work". Are you getting an error? What should it do and it's not doing? Or what is it doing that it shouldn't?
January 30, 2014 at 5:11 pm
Reviving a thread twice 😛
January 30, 2014 at 5:01 pm
Would this help?
http://www.sqlskills.com/blogs/kimberly/guids-as-primary-keys-andor-the-clustering-key/
http://blogs.msdn.com/b/sqlserverfaq/archive/2010/05/27/guid-vs-int-debate.aspx
Maybe even a post from a GUID lover:
http://blogs.msdn.com/b/sqlazure/archive/2010/05/05/10007304.aspx
Or even BOL on Using uniqueidentifier Data:
http://technet.microsoft.com/en-us/library/ms190215(v=sql.105).aspx
January 30, 2014 at 3:47 pm
Adam Angelini (1/30/2014)
Use the MAXERRORS option and set it to a really high number.
And use an errorfile to find out what failed.
January 30, 2014 at 2:15 pm
Viewing 15 posts - 7,051 through 7,065 (of 8,731 total)