Viewing 15 posts - 13,456 through 13,470 (of 13,838 total)
Your syntax isn't quite right. Try this:
insert into sales_copy(stor_id,ord_num,ord_date,qty,payterms,title_id)
select stor_id, ord_num, ord_date, qty, payterms, title_id from sales
July 14, 2005 at 5:12 am
Does the insertion order matter? Can't you just create a clustered primary key to force the display order?
July 13, 2005 at 8:53 am
Apart from the table names being plural (I think most DB developers tend to stick to singular), your naming convention looks absolutely fine to me. Having a 'LastUpdated' column in...
July 13, 2005 at 8:32 am
Rather than DROP/CREATE, why don't you just TRUNCATE the table? Not that that will save much time though ...
July 13, 2005 at 8:24 am
Deterministic or not, the argument (and therefore the result) of the CONVERT function varies every time the function is called. If 250,000 rows are returned, that's approx 40 million invocations...
July 8, 2005 at 9:37 am
Oh good. Well, if there's a lot of data, that's a lot of CONVERTs - approx 15 per row returned. I reckon it might all add up. Missing links don't...
July 8, 2005 at 9:26 am
Do you mean why is it faster doing nothing than doing CONVERTs??
July 8, 2005 at 9:05 am
From what you've said, I think the temp table / table variable (each should be tried to see which is faster) is the way to go too.
July 8, 2005 at 6:53 am
Can you change the back-end field types to nvarchar, rather than doing the converts? I'm guessing not.
July 8, 2005 at 6:44 am
So you actually want to DELETE the data from table A that's already in tableb?
If so
delete from TableA
where tableA.ID in (select ID from tableB)
should do the trick. Obviously, I'm assuming...
July 8, 2005 at 6:37 am
Also, getting rid of the in-line CONVERTs would speed things up.
July 8, 2005 at 6:30 am
There's probably a fancy way, but you could always create a new ID field in table Y (identity, seed = 12000 (or whatever you need your numbering to start at),...
July 8, 2005 at 6:26 am
Could this be a security issue? If it runs when you execute it manually, yet not when it is executed by the SQL Server Agent, that is what I would...
July 8, 2005 at 6:20 am
Can you overwrite the path with one that is valid before the error message appears? Sorry, I should know, but I haven't done this for a while.
July 6, 2005 at 8:00 am
Viewing 15 posts - 13,456 through 13,470 (of 13,838 total)