Viewing 8 posts - 1 through 8 (of 8 total)
I agree with noeld that there are definitely a lot of ways to do this. From a T-SQL point of view, I found the following useful link, which creates user...
May 31, 2004 at 1:15 pm
Don't know if the following will help as you mentioned that you don't want to use dynamic SQL. I've run the procedure above, but made the first statement dynamic, i.e.
EXEC('SELECT...
May 12, 2004 at 10:28 am
Try executing the sp_helpdb stored procedure (without any parameter values) in the master database which should show all databases and their owners.
Alternatively, you can use:
select name, suser_sname(sid) from master.dbo.sysdatabases
(Got it from...
May 12, 2004 at 1:25 am
Don't know if the following will help. I got it from Microsoft's web site.
convert(datetime,term_date+" "+
substring(term_time,1,2)+":"+
substring(term_time,3,2)+":"+
substring(term_time,5,2) )
given that term_time has 6 characters (I was thinking about something like...
May 6, 2004 at 7:32 am
According to SQL Server Books Online you can either specify the file name or file id, so can't you then use DBCC SHRINKFILE (1, 2000)?
In their example they don't have...
May 6, 2004 at 1:13 am
Sorry for the smiley, seems like I have to change the spacing:
CONVERT (int, <identity field> ) AS <identity field>
but I guess you would have noted what it should be
May 5, 2004 at 1:19 am
What happens if you use the field list, but replace the identity field with:
CONVERT(int, <identity field> AS <identity field>
together with top 0, etc. as you...
May 5, 2004 at 1:16 am
What about the following?
if exists (select * from master..sysdatabases where name = <DB Name> and category > 0)
...
May 4, 2004 at 7:32 am
Viewing 8 posts - 1 through 8 (of 8 total)