Viewing 15 posts - 91 through 105 (of 123 total)
This will give you a row count for every table.
SELECT so.name, rowcnt
FROM sysobjects so
JOIN sysindexes si
ON so.id = si.id
WHERE indid = 1
AND type = 'U'
July 31, 2007 at 12:31 pm
I just figured it out.
I added a variable: @sql varchar(100)
Populated it with the value I wanted: @sql = 'EXEC TEST_abc_UserNameUpdate ' + @UserToFind + ', '...
July 31, 2007 at 11:16 am
Thanks ED. This is good if I am searching one column. But I am searching many columns that may or not exist in each table.
...AND sc.name IN ('AccessUserName', 'CancelledUserName', 'CancelUserName',...
July 27, 2007 at 2:13 pm
I've tried that but the cursor is a variable and it doesn't work and thus this posting.
DECLARE @ObjectName varchar(100) -- tried with and without this using ObjectCursor directly in the alternative
DECLARE...
July 27, 2007 at 1:26 pm
I have a query that retrieves the table names where certain column names appear. Something like this
SELECT DISTINCT so.name
FROM syscolumns sc
JOIN sysobjects so
ON sc.id = so.id
AND sc.name IN ('AccessUserName'...
So I then get a list of table...
July 27, 2007 at 1:20 pm
One way would be to send the results to yourself as text file. First create a stored procedure for your query. Then run
EXEC master.dbo.xp_sendmail
@recipients = 'youremailaddress'
, @subject = 'Whatever'
, @message =...
July 13, 2007 at 3:31 pm
David.Poole,
Could you provide sample code? This is what I have currently added to the stored procedure:
INSERT INTO Test
(StoredProcedure, UserName, ComputerName, Application, RunDate)
VALUES ('TESTasp_AddressDetail', SUSER_SNAME(), HOST_NAME(), APP_NAME (), GETDATE())
So naturally the...
July 2, 2007 at 2:51 pm
What about server performance if profiler is running the trace continuously?
July 2, 2007 at 2:26 pm
when do you guys work?
June 25, 2007 at 3:06 pm
Tom,
I ran both steps together and got the results in about 1 to 2 seconds!
June 11, 2007 at 3:19 pm
Thanks everyone for your input. These were all great suggestions. They all work good and when comparing speed only, here are the results:
The one I posted takes about 4 seconds
JLK: 1...
June 11, 2007 at 1:27 pm
Viewing 15 posts - 91 through 105 (of 123 total)