Viewing 15 posts - 8,566 through 8,580 (of 13,460 total)
WayneS (10/14/2010)
Looks like you're making things more difficult than necessary Lowell! ;-):w00t:
clearly!
A lot like you, I'm trying to anticipate the requirement and provide a solid example, but obviously...
October 14, 2010 at 9:50 am
using my magic hat and mind reading glasses, i read your request two ways differently than mazzz did:
1. that you really meant "create an empty table with the same column...
October 14, 2010 at 7:25 am
As Criss Morris suggested, using the OUTPUT clause is the best, especially if you want to capture multiple rows.
here's a prototype/best guess based on the SQLs you posted; this might...
October 14, 2010 at 6:45 am
you have to convert the field to a datatype that is allowed to be grouped, like a varchar()
SELECT ID, COUNT(Txt1) AS Txt1, Txt2, CONVERT(varchar(2000),Memo1)
FROM myTable
GROUP BY ID, Txt2, CONVERT(varchar(2000),Memo1)
HAVING (ID...
October 13, 2010 at 5:09 pm
the mail runs from the msdb database, so you have to fully qualify everything, like
EXEC msdb..sp_send_dbmail
@profile_name = 'reports',
...
October 13, 2010 at 4:46 pm
just change your plan to use a stored procedure.
a function cannot change data. No DML operations allowed, no dynamic SQL and a lot of other restrictions.
a stored procedure does not...
October 13, 2010 at 3:24 pm
Larry Kruse (10/13/2010)
October 13, 2010 at 12:23 pm
ok a bit of reearch reveals a few things.the .RecordsAffected will pretty much return -1 every single time.
There is no count because the reader is streaming the results in from...
October 13, 2010 at 11:56 am
i think the reader has a reader.RecordsAffected property;
so you should be able to get the # records from reader.RecordsAffected?, right? or is that for a different purpose than i think?
October 13, 2010 at 11:37 am
well everything depends on what you want to do;
there's usually a reason why you want to audit old and new data; typically you create an audit table with nearly the...
October 13, 2010 at 8:52 am
i have this saved, which uses the old sysindexes view;
i have not updated it to use sys.indexes and whatever sys view has some index details; this might help:
SELECT object_name(id) as...
October 13, 2010 at 6:27 am
Paul Farnell (10/13/2010)
Thanks for your reply however I want to see how much physical space in KB each index takes up.
Paul one of the output columns is [IndexKB] in...
October 13, 2010 at 6:18 am
you might be mixing information from a different database system...as far as i know, I SQL Server there is not a GUID associated with the old/new rows;
you have the rows...
October 13, 2010 at 5:39 am
yeah, i switched away from SQL2000 a while ago, and all my scripts are targeted for the newer platform.
take a look at this script contribution i made for SQL 2000:
October 13, 2010 at 3:43 am
a forwarded email is beyond the control of the SQL server and sp_send_mail;
the client application which forwards the mail may add lines, headers, footers, indent everything in the email and...
October 12, 2010 at 3:34 pm
Viewing 15 posts - 8,566 through 8,580 (of 13,460 total)