Viewing 15 posts - 271 through 285 (of 340 total)
That is not really what SQL was designed to do.
Your best bet would be to do this in a reporting tool.
There are possible approaches, but the SQL would be...
November 5, 2008 at 9:40 am
I'd really suggest looking for the areas that are slow. Then look for an answer.
November 5, 2008 at 9:20 am
While you have an index for each of the items, the optimizer has decided that it is easier to just read the whole table, rather than to read each of...
November 5, 2008 at 9:12 am
best approach would be to setup an SSIS package.
use SQL server agent to run it as needed (daily, etc)
Have the package look for new XML files, open up, read as...
November 5, 2008 at 9:02 am
Agree, use IDENTITY_INSERT ON, and don't for get to issue the OFF command.
And for the select, if possible, use a where command that ensures that the id's being inserted do...
November 5, 2008 at 8:56 am
Rather than actually combining the tables into a new table, I would suggest setting up a materialized view over all the tables. (that is view with index)
This will be...
November 5, 2008 at 8:48 am
Interesting question.
You may have to test both approaches. you not only have the comparison time, you also have the convert time. Converting a char to a...
November 5, 2008 at 8:45 am
A+ for keeping at it.
November 5, 2008 at 8:40 am
Also, if you are getting the table locked up, it could be that your query within the trigger has decided that it needs to issue a table lock. So,...
November 5, 2008 at 8:39 am
it really depends on the query, and if you have indexes on the FK's. The optimizer will consider, and for reporting, return speed is important. If you do...
November 5, 2008 at 8:35 am
with the convert statement, you have the third optional value, which tells the convert statement how to format the value which is for character converts, not datetime.
So drop...
November 5, 2008 at 8:33 am
the best approach would be to use a trigger.
On insert, populate createdate = getdate(), modify date = NULL or really better = getdate()
On update, update the modify date = getdate()
-...
November 5, 2008 at 8:29 am
sql server agent is your friend. as noted above, it schedules jobs, and does it well.
November 5, 2008 at 8:21 am
Wow,
First off, build a new table for the database that has the 111-11-1111 format, with two columns, one with the original value, and the other with the new, cleaner...
November 5, 2008 at 8:19 am
We'll that fact that you are asking is a start in the right direction. But not something that can be answered in a forum.
1) really focus on what are...
November 5, 2008 at 8:13 am
Viewing 15 posts - 271 through 285 (of 340 total)