Viewing 15 posts - 7,966 through 7,980 (of 8,731 total)
A possible solution would be like this. I'm worried about performance though. Couldn't you correct the data in the first place?
CREATE TABLE #Table1( patid varchar(10))
CREATE TABLE #Table2( patid varchar(10))
INSERT INTO...
July 1, 2013 at 9:13 am
Please post your query and the problem you had so we can help you. 😉
July 1, 2013 at 8:21 am
People usually use STUFF in the code you're using to eliminate the first comma. Since you're not eliminating any character, there's no need to use it.
Be sure to understand...
June 28, 2013 at 9:28 pm
Great! If you still have questions, come back to ask.;-)
June 28, 2013 at 7:50 pm
You had a good idea, but you missed the creation of the comma separated values. To learn how to do it you can read the following article. Creating a comma-separated...
June 28, 2013 at 6:24 pm
Actually, statistics refer to the tables and are independent from the Stored Procedure.
If you post the actual execution plan, you could get more help. Actually, I would recommend you to...
June 28, 2013 at 5:21 pm
That's because you have the SomeID column that will help you with the group by. That's why I needed a Row_Number() to simulate the SomeID column.
June 28, 2013 at 4:48 pm
There's a better way, you need to check for Dynamic SQL. Check the article Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs[/url] and come back if you need...
June 28, 2013 at 4:44 pm
Please check the following article and come back if you need help. 😉
http://www.sqlservercentral.com/articles/comma+separated+list/71700/
June 28, 2013 at 4:41 pm
Why are you using STUFF anyway?
SSMS won't show all the characters in a varchar(MAX), you need to export them to some client that will show them (or check this article...
June 28, 2013 at 4:36 pm
If I understand correctly, your original Strings were
A,A,F
B,D,Y
C,E,Z
Otherwise, I'm not sure that you're getting those results.
However, given the information you supplied, this code would do the trick. It might...
June 28, 2013 at 3:42 pm
Shouldn't it be ok if the instances are on different servers?
I'm sure it's a different problem (I might be wrong:-P).
June 28, 2013 at 3:18 pm
The problem is that you don't have an ORDER BY clause. Without it, SQL Server can't guarantee an order of the returned rows.
June 28, 2013 at 1:30 pm
Eugene,
I found this reference googling dbcc traceon(610)
http://sqlserverplanet.com/data-warehouse/sql-server-2008-minimally-logged-inserts
Again, I'm not saying is a good choice, simply an advice I've got.
June 28, 2013 at 11:22 am
Welcome to this forum,
I really hope that we can help you, but there's something that I can't understand. You say: "The flag indicator will tag with 'Y' if 1...
June 28, 2013 at 11:17 am
Viewing 15 posts - 7,966 through 7,980 (of 8,731 total)