Viewing 15 posts - 91 through 105 (of 268 total)
One alternative would be to use SET ROWCOUNT and have a set based delete query:
set rowcount 1000
declare @continue char(1)
set @continue = 'Y'
while @countinue = 'Y' begin
delete <table>
where...
August 11, 2003 at 6:06 am
There may be a neater solution than this but you could set up a triggers on each table for insert, update, delete which then update rows in a table. ...
August 8, 2003 at 8:54 am
I read somewhere (but I cannot find it at the moment) that if you change the sort collation, stop and restart the SQL Service, then the indexes on the system...
August 8, 2003 at 4:18 am
Have a look at this:
http://www.sqlservercentral.com/faq/viewfaqanswer.asp?faqid=206
The downside is that you can only return one value at a time but if you put it code into a function then you can get...
August 7, 2003 at 6:48 am
That's fixed it.
I had to recreate the stored procedure on server #1 in QA rather than in EM.
Thanks.
Jeremy
August 6, 2003 at 8:08 am
OK. Let's test you out on linked servers.
I have two servers and server #2 is a linked server on server #1. Some procedures on server #1 call procedures...
August 6, 2003 at 7:26 am
You will need to set up a linked server (in Enterprise Manager) and then you can query a remote database:
select *
from [remote_server].[database_name].[owner].[table_name]
If you fully qualify it with...
August 6, 2003 at 1:50 am
sp_spaceused without a table name gives the unallocated space in the current database.
Jeremy
August 5, 2003 at 6:07 am
You can use sp_spaceused @table_name which gives various bits of information about a table including the number of rows and is probably quicker than select count(*) from ....
However, it is...
August 5, 2003 at 6:06 am
What do you want to save?
If want the script (to generate the table) then right mouse click the table, select All tasks, select Generate SQL Scripts, Select the Options tab...
August 4, 2003 at 7:20 am
It's very frustrating that print messages don't appear when they are printed.
Frank's suggestion of insert rows into a temporary table is about the only practical solution I have come across....
August 1, 2003 at 9:01 am
I'm not aware of anything like that. I believe that you have to declare and fetch each variable.
Jeremy
August 1, 2003 at 3:27 am
Antares,
I certainly agree to avoid UDFs in a where clause - I've been caught out a few times by this.
I made the changes to my date UDF as you suggested...
July 31, 2003 at 6:23 am
H,
I wasn't trying to steal your thread. I was trying to find out how other people use UDFs - there are a lot of people with a lot more experience...
July 31, 2003 at 5:31 am
Some timings:
No UDFs (Basic) - 1036 rows/second
Basic + Currency Conversion UDFs - 770 rows/sec
Basic + Date UDFs - 550 rows/sec
Basic + Currency UDFs + Date UDFs - 480 rows/sec
Basic +...
July 31, 2003 at 2:20 am
Viewing 15 posts - 91 through 105 (of 268 total)