Viewing 15 posts - 871 through 885 (of 1,315 total)
Use the full syntax for sp_executesql to pass parameters in and out.
declare @z varchar(150)
exec
sp_executesql
April 12, 2006 at 5:30 pm
SELECT
Sales, Profit,
SUM(CASE WHEN <condition1>...
April 12, 2006 at 5:09 pm
The command text of a job step is limited to 3200 chars.
[@command =] 'command'
Is the command(s) to be executed by SQLServerAgent service through subsystem. command is nvarchar(3200), with...
April 12, 2006 at 5:02 pm
The sqlmaint.exe utility and the msdb tables that support SQL 2000 maintenance plans are going away. SQL 2005 includes the stored procs you mention, but the tables are there only if SQL...
April 12, 2006 at 9:42 am
I was suggesting that the SQL server create some kind of artifact, such as text, log, or XML file, in a share visible to a unix/linux box. The "sendmail" I...
April 5, 2006 at 1:17 pm
You could use Visual Basic, or even VBScript. You can even use sp_OAxxx procedures to access SQLDMO objects in T-SQL.
This script may be of some use. It won't export existing registrations, but you...
April 5, 2006 at 10:29 am
If you install the SQL 2005 client tools (which support your 7.0 and 2000 servers), you can import your existing registrations in Management Studio and then export them to an XML...
April 4, 2006 at 12:39 pm
I agree, the join on "where Seq2.SeqNumber < Seq1.SeqNumber" will be a killer with large tables.
This version...
April 3, 2006 at 2:34 pm
That would involve an illegal connection to the monitored server.
If you could find a Unix geek that was frozen in a glacier 20 some years ago with his 286 Xenix...
April 3, 2006 at 1:55 pm
Don't look now, but your "where c.val = 8" just turned all the left joins into inner joins.
March 31, 2006 at 2:42 pm
That's a great solution if one of your goals is job security, but unfortunately it gives you the wrong answer.
You implied it was a datetime field originally, not character. If...
March 31, 2006 at 2:19 pm
You can use the WHERE clause with INNER JOIN with no problems:
SELECT <fields>
FROM a INNER JOIN b ON a.id = b.id
WHERE a.x > 0 AND b.x > 0
If you want...
March 31, 2006 at 8:53 am
If you used a unique index rather than a primary key or unique constraint, you could use the IGNORE_DUP_KEY option. Insert all the rows you like, and the duplicates will...
March 31, 2006 at 8:10 am
That will only average the date part. If you want to average durations (time values), you need to do something different.
select avg(cast(date_field as float)) -- Get average date & time
select...
March 31, 2006 at 7:45 am
Did you create new registrations in SMS, or use "Previously Registered Servers" to pull in old EM definitions?
I haven't found the old "Display SQL Server state in console" option in...
March 30, 2006 at 10:12 am
Viewing 15 posts - 871 through 885 (of 1,315 total)