Viewing 15 posts - 1,936 through 1,950 (of 5,103 total)
Correct OSQL or sqlcmd *are* the tool of choise. But just for the fun of it :
declare @i_TargetDB varchar(200)
set @i_TargetDB = 'AdventureWorks'
EXEC('USE '+ @i_TargetDB +'
IF OBJECT_ID (''dbo.mine'', ''view'') is not...
July 6, 2007 at 1:31 pm
you can use exec() (in a tricky way
) for dynamic sql but you will have to escape *all* your '
July 6, 2007 at 11:54 am
the best solution is to reconfigure replication.
You are "guessing" the places where you will be changing the names and that is *very* risky and undocumented.
For one you probably need...
July 6, 2007 at 11:41 am
Peter is right on the spot.
The DEFAULT values for precision and scale of a DECIMAL datatype are: (p,s) = (18,0)
therefore if you don't specify precision and scale, at insert time...
July 6, 2007 at 11:23 am
Read "Delegation Requirements" from BOL
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/9e302c29-639d-4509-ba1e-cf452582c5c3.htm
To allow for impersonation.
I am assuming your server is using a DOMAIN USER account, right ?
July 5, 2007 at 12:38 pm
The cleanest method to change the collation is
1. create a *new* database from the scripted old one
2. Populate the data on the new from the old
3. Drop old database
4. Rename...
July 5, 2007 at 12:32 pm
and
@variable=column=formula
is equivalent to:
SET @variable=formula, column = formula
That is why it works for "Update" statements only
Cheers,
July 5, 2007 at 12:03 pm
Steve,
I join Hugo You *ARE* doing a great job. I just thought about a possibility that may have happened but I was *not* complaining at all.
Keep up the spirit!
July 3, 2007 at 9:08 am
OPENROWSET with the 'BULK' provider or BULK INSERT are your other choices.
July 3, 2007 at 8:52 am
If you need such comprenhesive set of features may I suggest you use SQL Server Sentry (http://www.sqlsentry.net/)
July 3, 2007 at 8:48 am
If this is a point in time and you are going to use an existing DB, the FIRST STEP is to backup the "CURRENT" transaction log ( so called tail...
July 3, 2007 at 8:38 am
try first:
exec master..xp_cmdshell 'Dir \\servername\sharename\' and test if that can "reach" the file.
July 3, 2007 at 8:35 am
Bert,
Lazy Spool are usually indications of lack of indexes or large operations. There are several things you can do.
First can you use ANSI joins instead of "old" notation
...
July 3, 2007 at 8:31 am
>>WHERE crt_expiration_date < Convert( varchar, DateAdd( dd, 31, GetDate()), 101 )<<
Keep in mind that such construct generates a varchar that will have to be converted "implicitly" back to datetime ...
July 2, 2007 at 2:43 pm
Viewing 15 posts - 1,936 through 1,950 (of 5,103 total)