Viewing 15 posts - 181 through 195 (of 304 total)
Thanks to both of you for your replies. The articles were very helpful.
November 11, 2008 at 6:17 pm
You have two options.
The first is to construct your query using dynamic SQL.
The second option is to convert the array to a table and then JOIN to that table.
The following...
November 11, 2008 at 5:48 pm
Your question is a little vague.
Can you provide some more specifics? Like table definition and sample data?
Forum Etiquette: How to post data/code on a forum to get the best help[/url]
Edit:...
November 11, 2008 at 5:44 pm
Smartdog (11/10/2008)
kuka_99 (11/10/2008)
i had the same problem. sql server trigger does not affect all rows when i updated more than one row a time.
what i do now is to...
November 10, 2008 at 8:10 pm
Let's say we have a case where the same functionality can be accomplished with either a CTE or a derived table.
Are there any performance benefits of the CTE?
Also, if you...
November 10, 2008 at 7:32 am
I thought of a different way to do this, but I'd like to test it first.
Can you please post some sample data?
November 7, 2008 at 6:47 am
Madhivanan (11/7/2008)
ggraber (11/7/2008)
Well. Also note that the procedure is dynamic and you can change the pivot or summary columns as you wish 🙂
Yes, I think it's very cool.
I've done a...
November 7, 2008 at 5:58 am
Madhivanan (11/7/2008)
Did you try it?It exactly works as per OP's expected result
I just tried it again, and you are correct, it works perfectly.
I don't know why I couldn't get it...
November 7, 2008 at 5:46 am
Madhivanan (11/7/2008)
ggraber (11/6/2008)
I think Ken's solution is the way...
November 7, 2008 at 5:27 am
You can use the STUFF function instead of creating your own function.
Like this:
-- first create some sample tables with data
DECLARE @Table1TABLE
(
ClaimID VARCHAR(20)
, ActivityCode INT
, ActAmount INT
, DenialCode CHAR(3)
)
INSERT INTO...
November 6, 2008 at 7:54 pm
I've been playing with using a dynamic PIVOT for your case, and it seems like it's going to be a little messy.
I think Ken's solution is the way to go.
November 6, 2008 at 7:27 pm
How about this approach? It may be faster than using an inline function.
[font="Courier New"]--create temp tables
CREATE TABLE #Table1
(
A INT
,B VARCHAR(10)
)
CREATE TABLE #Table2
(
C INT
,D INT
,E VARCHAR(10)
)
--insert...
November 4, 2008 at 8:28 am
AnzioBake (10/30/2008)
My solution employs a loop, but the query in side the loop is still...
October 30, 2008 at 7:39 am
Nice post J.
Davroche, we were all newbies once!
Here's the type of code we were asking for, so you'll know next time you post.
Now, all you need to do is...
October 30, 2008 at 7:32 am
Viewing 15 posts - 181 through 195 (of 304 total)