Viewing 15 posts - 10,711 through 10,725 (of 13,460 total)
getting the objects in dependancy order is pretty easy;
here is an example:
CREATE TABLE #MyObjectHierarchy
(
HID int identity(1,1) not null primary key,
...
Lowell
July 30, 2009 at 9:20 am
it depends on what you are doing Dean;
offhand, if it was a simple find and replace, you could do something like this:
declare
@sql varchar(max)
declare c1 cursor for
SELECT ROUTINE_DEFINITION...
Lowell
July 30, 2009 at 9:01 am
i was going to suggest teh same thing Paul suggested...forget trying to enable/disable a trigger, simple put an IF statment to check for that specific user;
here's a handy script to...
Lowell
July 30, 2009 at 5:21 am
i assumed this was pseudocode and he was using a temp table in the procedure;if it's a real table, Madhivanan is right , you'll have concurrency issues.
Lowell
July 30, 2009 at 5:08 am
you need to either built your table with all it's columns, or use the EXEC(@sqlstatement) to do the alter an iupdate.
the database engine expects either a GO statement, so it...
Lowell
July 29, 2009 at 5:03 pm
I was stubborn and decided i had to do this the hard way via T-SQL;
take a look at my script contributions here:
Get DDL for Any SQL 2000 Table
Lowell
July 29, 2009 at 4:49 pm
here's an example which uses the FORXML to produce a comma delimited list as a result for each ID:
is this what you were after:
Resource_Id Skills ...
Lowell
July 29, 2009 at 10:59 am
tom.goehring (7/29/2009)
Did you ever get a chance to create the procedure for the steps below:
3) Install IIS (please include with what pieces to install and configure)
4) How do I create...
Lowell
July 29, 2009 at 9:10 am
there is a script submission that loads all the trace files into a table here:
Default Trace Load of All 5 Files[/url]
you could easily change the command from '*.trc" to logins*.trc"...
Lowell
July 29, 2009 at 7:36 am
nope, no other way. even the GUI does that behind the scenes...the ALTER TABLE clause only lets you changing some of the other attrivutes for column, like ISNULL,...
Lowell
July 29, 2009 at 6:37 am
what you want is the sp_rename function.
with that, you can rename any object...table, constraint,column...doesn't matter.
to rename a column, the syntax is like this:
EXEC sp_rename 'SchemaName.TableName.ColumnName', 'NewColumnName, 'COLUMN';
Lowell
July 29, 2009 at 6:24 am
how about wrap it with try catch, and use dynamic SQL instead; that way it won't test for the connection until the EXEC fires:
BEGIN TRY
Begin Transaction
IF @p_LoadExcelB = 1
BEGIN
SET @sql='
INSERT...
Lowell
July 28, 2009 at 9:17 pm
ok, i know that the moment you use a function on a JOIN or WHERE condition, you lose the ability to use indexes, and it requires a table scan.
Your #1...
Lowell
July 28, 2009 at 5:42 pm
why not create a view, so it is always ready on demand?
CREATE VIEW MyTrace As
Select * from FROM ::fn_trace_gettable(c:\my_trace.trc", default)
Lowell
July 28, 2009 at 3:29 pm
probably a misstatment, but you can't use a trigger i think, but you can certainly use a script to test for your invalid columns:
here's an example of the first two...
Lowell
July 28, 2009 at 12:31 pm
Viewing 15 posts - 10,711 through 10,725 (of 13,460 total)