Viewing 15 posts - 1,306 through 1,320 (of 1,472 total)
john.steinbeck (10/22/2008)
that is my exact code... running in a query... but it is a function where the begin and end dates will be passed in...
Aha. That's the piece of...
October 22, 2008 at 2:57 pm
I'm not following what your question is then. Are you just looking for an example of how to do an insert with Dynamic SQL? Any chance you could...
October 22, 2008 at 2:47 pm
Is that exact code failing on your server, or is that a representation of what you're trying to do?
October 22, 2008 at 2:39 pm
That code executes properly on my box. It also executes without the where for all 30,000 lines of my current Tally Table. (Up to year 4508)
October 22, 2008 at 2:35 pm
You shouldn't need dynamic SQL to accomplish this goal.
Take a look at the following:
INSERT INTO NewTable(A,B,C,D,E,F,G,Total)
SELECT A,B,C,D,E,F,G,SUM(A+C)
FROM OldTable
WHERE B = Something -- Optional Where clause
GROUP BY A,B,C,D,E,F,G
October 22, 2008 at 2:10 pm
Can you copy the code directly from your stored procedure as you have it and paste it here? I get your expected result when I run my code against...
October 22, 2008 at 12:54 pm
Your best approach would begin with posting sample table structure / data and showing us what you're trying to do(by posting your code), and explaining why it's not working and...
October 22, 2008 at 12:37 pm
But its failing for this cond
e.x @language ='ru'
Select 1,’TEST’,’English Testing’,’EN’ UNION ALL
Select 2,’Science’,’Science Testing’,’EN’ UNION ALL
Select 3,’History’,’History Testing’,’EN’ UNION ALL
If you're running that against your "test" data......
October 22, 2008 at 12:30 pm
Dan Segalles (10/22/2008)
But if you think you have time to fix the solution you have then that would be great.
Unfortunately, I've hit a dead wall with the method I...
October 22, 2008 at 11:49 am
At this point it would help to have some DDL and sample data for these tables. We are only going to be able to throw theory / keywords at...
October 22, 2008 at 7:21 am
Sorry for not getting back with you Dan. Lost the primary hard drive in my dev machine yesterday, so it was an all day affair getting the thing back...
October 22, 2008 at 7:09 am
I went back and forth on even posting this as is, but maybe it will help you. This solution would build an all encompassing table that covered all currency...
October 21, 2008 at 11:24 pm
Gonna need more information.
How much data is "very large amount of data"? How many rows in each of the 4 tables you are working with?
How long is "sholdnt take...
October 20, 2008 at 4:08 pm
Viewing 15 posts - 1,306 through 1,320 (of 1,472 total)