Viewing 15 posts - 76 through 90 (of 276 total)
owen983 (3/29/2010)
March 29, 2010 at 2:42 pm
It's normally a very bad idea to programatically add a column as a matter of course and it's usually really bad if it's accomplished by a sproc that a user...
March 18, 2010 at 7:05 am
Michael Valentine Jones (3/17/2010)
if not exists (select * from syscolumns
where id=object_id('Calendar') and name='RDATE')
BEGIN
ALTER TABLE Calendar add RDATE DATETIME
exec ('UPDATE calendar set RDATE = DATE...
March 17, 2010 at 1:02 pm
The update cannot occur there.
IF NOT EXISTS (SELECT * FROM syscolumns
WHERE id=OBJECT_ID('Calendar') AND name='RDATE')
BEGIN
ALTER TABLE Calendar ADD RDATE DATETIME
END
ELSE
BEGIN
PRINT 'ALREADY THERE'
END
GO
UPDATE calendar SET RDATE = DATE + 36163
-- Add some...
March 17, 2010 at 12:27 pm
I would consider creating an index - Something with ID, and startdate.
Also, reworked the last select.
SELECT *
FROM [dbo].[test_data] AS a
INNER JOIN...
March 16, 2010 at 10:06 am
what you are doing at the end is dynamic sql - http://www.sqlteam.com/article/introduction-to-dynamic-sql-part-1
you will want to change:
SELECT COUNT(AField) AS RecCount
FROM @DBTbl
To something like this:
EXEC( 'SELECT COUNT(AField) AS RecCount FROM...
March 3, 2010 at 11:27 am
Per BOL:
[ @subject = ] 'subject'
Is the subject of the e-mail message. The subject is of type nvarchar(255). If no subject is specified, the default is 'SQL Server Message'.
I bet...
February 23, 2010 at 9:29 am
I am sure there are other ways, but here is one:
on the affected machine:
Start -> run
Type "Services.msc" without the quotes
find your sql server service, right click, properties (or dbl click)
click...
April 15, 2009 at 5:42 am
I would check to see what context the sql server is running under - I think it is local user, and that user has changed its password recently, but did...
April 14, 2009 at 1:54 pm
Okay - even though there seems to be enough correct answers, I wanted to post my results as well, because I took the time to do this 😀
I used 5...
April 7, 2009 at 12:07 pm
I am not sure what you are trying to ask - perhaps some more detail would help.
April 7, 2009 at 6:52 am
sp_helpdb?
it lists the DBname, DBSize, and some other stats.
March 16, 2009 at 8:36 am
Another option is SQLCMD.
example
sqlcmd -S "servername" -Q "some query" -o \\Output_location\outputfile.txt
there are plenty other options.
August 11, 2008 at 8:20 pm
Thanks for getting back to timely with the solution -
Since we are talking about next version things, I had to make one other modification to not backup snapshots:
in the...
June 6, 2008 at 12:53 pm
I have started testing and implementing this process, and so far, I like it! The issue I currently am having is "The statement BACKUP LOG is not allowed while...
June 6, 2008 at 11:33 am
Viewing 15 posts - 76 through 90 (of 276 total)