Viewing 15 posts - 931 through 945 (of 1,156 total)
Forgot to mention that you have to change a column defintion. You will not save the change, so it doesnt matter. This is to trick SSMS into creating...
December 28, 2007 at 10:59 am
Michael has a good point here. You will have to do some pretty complex maneuvering to get this accomplished, fortunately SQL Server 2005 has a generator to create all...
December 28, 2007 at 10:55 am
This is not possible using bulk insert. Try using Openrowset with the BULK option.
More Info:
December 28, 2007 at 10:37 am
You are absolutely right this conversation has deviated from the original post. I went off tangent, in my rant about PIVOT 😀
December 28, 2007 at 7:39 am
Todd,
There is no doubt that using PIVOT is beneficial in some situations; however, multiple aggregations is not one of them. In your example, you cannot "easily" provide a sum...
December 28, 2007 at 7:00 am
Thanks for the feedback
I knew the problem had to be an outside anomalie because we exhausted all other options. I am glad everything worked out, except...
December 27, 2007 at 3:49 pm
"Dynamic Stored Procedures" is a Stored Procedure that uses dynamic sql instead of traditional tsql. You have to be careful here because you may not be as effective in...
December 27, 2007 at 2:34 pm
The create table statement is preventing this from being conditional. Try removing the create table statement from the query (after the table is created) and run the conditional insert...
December 27, 2007 at 2:17 pm
Dynamic pivot has limited flexibility, as you can only aggregate one column at a time. There are plenty workarounds to accomplish multiple aggregations but the logic becomes overly complicated.
I...
December 27, 2007 at 11:44 am
Once you complete the tlog backup, you have to restore the full backup and the tlog backup.
December 26, 2007 at 2:47 pm
You need to specify WITH NO_TRUNCATE. Otherwise the log will be truncated.
December 26, 2007 at 2:46 pm
In this case you can use the code I provided. You will have to change some stuff around, but the concept will hold true. If you pass in...
December 26, 2007 at 2:23 pm
Also, you should be weary of the database server. ORACLE 9i has problems connecting to a 64 bit server, as the client tools drivers are not supported.
December 26, 2007 at 1:32 pm
Gotcha. There is no easy way to do this in SQL if you are running individual batches. I do not know of any other tool you can use...
December 26, 2007 at 1:27 pm
I maybe understanding what you are doing incorrectly but it sounds like you passing the status value in as a parameter to a stored procedure?
DECLARE @TB TABLE(
[STATUS] INT,
[STATUS_DESCR] VARCHAR(25)
)
INSERT INTO...
December 26, 2007 at 1:22 pm
Viewing 15 posts - 931 through 945 (of 1,156 total)