Viewing 15 posts - 10,036 through 10,050 (of 13,461 total)
carl you do not need the where clause at all inside a trigger;
The trigger there are two virtual tables named INSERTED and DELETED;they have a mirror of the columns in...
February 1, 2010 at 9:16 am
i think this is pretty close; renaming the new db and it's files:
it gives me this for the print statement:
RESTORE DATABASE [MSPHXX_ARC_2010_02_01] MOVE N'MSPHXX_ARC' TO N'K:\MSPHXX_ARC_2010_02_01.MDF',
MOVE N'MSPHXX_ARC_LOG' TO N'L:\MSPHXX_ARC_2010_02_01.LDF'
FROM...
February 1, 2010 at 9:08 am
my script just had print @sql; i did not include the final exec(@sql); sorry, i thought that was intuitive;oops!
just add that to the end of it;
I assumed that since we...
February 1, 2010 at 8:26 am
it's all part of the rESTORE command; i just fiddled with a backup command and scripted it;
i think you mean the MOVE command, right?:
RESTORE DATABASE [SandBox_2010]
FROM DISK =...
February 1, 2010 at 8:15 am
i think the easiest is a full backup, and then a restore with a name that was dynamically created.
i don't think the backup command takes a variable for the database...
February 1, 2010 at 7:47 am
in sql 2000, you cannot do it.
any error 16 or above, which would be datatype error like you saw, constraint violations for foreign keys/pk/unique constraints cannot be custom captured.
you can...
January 31, 2010 at 11:57 am
if your column is varchar or nvarchar, it's fairly easy; you know the exact length of the string to catch, and can use charindex or patindex to find where it...
January 29, 2010 at 1:46 pm
Jason does your string always have exactly two items, or is it a long string where the first five items are SSN/name/address, and comma delimited 6 thru N are items?
you...
January 29, 2010 at 11:58 am
also look into SQLRecon;
it's free and does a very thorough scan of all IP's on your network, looking for SQL in multiple ways.
January 29, 2010 at 11:53 am
i think he's asking is it a good practice to make columns NOT NULL and insert default values, vs leaving them nullable.
as usual, the answer is "It depends"; this is...
January 29, 2010 at 10:26 am
starting with the obvious, did you select * from sys.traces? maybe it's a server side trace someone has created?
select * from sys.traces
--results
id status path ...
January 29, 2010 at 9:02 am
Ken for me, what i end up doing is still creating a PK on an identity column, ie "ContractID",
and having a unique constraint on the columns that make a unique...
January 29, 2010 at 8:49 am
i think one problem is you are joining the same table 6 times, when it is not necessary:
SELECT a.ID, RTRIM(LTRIM(a.ID)) as fID,
a.demID,
b.mid AS gp,
c.mid AS op,
d.mid AS oom,
e.mid AS...
January 29, 2010 at 7:42 am
there's two concepts you'll want to use here to get the desired results:
using a CROSS JOIN can give you every possible combination.
using a LEFT OUTER JOIN can show you...
January 29, 2010 at 7:33 am
the recommended way is to use the count of the rows in the indexes to get the number of rows; it's already materialized, and much faster than querying each table...
January 29, 2010 at 7:24 am
Viewing 15 posts - 10,036 through 10,050 (of 13,461 total)