Viewing 15 posts - 2,866 through 2,880 (of 3,233 total)
This syntax should work. I could not test it as you did not include your table DDL and sample data. It may need tweaked slightly, but the idea is sound.
UPDATE...
May 17, 2006 at 1:20 pm
Ah, I appologize. I did not read your question correctly. I was thinking that your error was during runtime.
May 17, 2006 at 1:02 pm
1. Move duplicates to temp tables.
2. Delete values from base tables.
3. Insert from temp tables into base tables and use SUM and GROUP BY to perform your roll up.
May 17, 2006 at 12:58 pm
Once you schedule the package, SQL Server creates a job to execute the package. In EM, go to Management>>SQL Server Agent>>Jobs and find the job for your package. Look at the...
May 17, 2006 at 12:47 pm
I am still not real clear on what you want your end result to be. Can you post some sample data and an example of how you want your results...
May 17, 2006 at 10:59 am
You need a WHERE clause to limit your results to the last 4 months.
May 17, 2006 at 10:12 am
Your BCP syntax is fine. You are seeing a problem with how xp_cmdshell is interpreting the double quotes. Try using set quoted_identifier on before your exec statement.
May 17, 2006 at 9:42 am
You are getting this error because your variables, as you have them defined, are scoped to your current stored procedure. When you call sp_executeSQL, you enter a new scope so...
May 17, 2006 at 9:33 am
That's what I thought you were saying. There will be a small amount of overhead in, like you said, checking for the nullness of the column upon insert, but I do...
May 17, 2006 at 9:00 am
Or leave it there, but have your trigger code check for a flag that tells it whether auditing is on or off.
May 16, 2006 at 4:31 pm
ALTER TABLE dbo.CommissionPayment ADD CONSTRAINT [DF_Amount] DEFAULT (0) FOR [Amount]
May 16, 2006 at 4:18 pm
Are you saying that columns in your temp tables are defined as NOT NULL?
May 16, 2006 at 4:08 pm
The only way you could do this in a stored procedure would be to use dynamic SQL as David has shown. I, personally, would come up with a different solution...
May 16, 2006 at 4:00 pm
"The new server only has 745 MB."
745 MB?? You need more memory. If you've retested and everything works fine with more memory (on your old server) and you are getting...
May 16, 2006 at 8:46 am
Is 2GB all you have installed on the server? How much memory was allocated to SQL Server on your old server? Is this new server servicing more databases than the...
May 15, 2006 at 12:07 pm
Viewing 15 posts - 2,866 through 2,880 (of 3,233 total)