Forum Replies Created

Viewing 15 posts - 8,806 through 8,820 (of 13,469 total)

  • RE: Oracle Wrap like utility in MS-SQL

    the example i gave you will work with absolutely any SQL command; try it before you dismiss it.

    Declare @cmds Nvarchar(MAX)

    Declare @obfoo varbinary(MAX)

    Set @cmds = '

    ALTER procedure [dbo].[sp_find]

    @findcolumn varchar(50)

    AS

    BEGIN

    ...

  • RE: Oracle Wrap like utility in MS-SQL

    are you sending the actual scripts fo rhte client to run, or an executable which will then execute the script after the client provides connection information to the server?

    you could...

  • RE: after insert trigger

    yep, so your WHERE statement would reference the THREE columns that make up your primary key:

    ...WHERE TableName.IdContrato = INSERTED.IdContrato

    AND TableName.EiCanalId = INSERTED.EiCanalId

    ...

  • RE: after insert trigger

    igngua (9/7/2010)


    thanks!!

    im using this one because the other one cant get updated.

    Ive a question if you excuse my 'newbieness', what does 'id' means.

    i had to infer a lot of...

  • RE: Disabling index by using select query

    if the query has a WHERE statement, you could make the arguments non-SARG-able, and force it to use a table scan, but it would still use an index(probably the clustered...

  • RE: Columns_Updated() in update trigger reverses the bitmask?

    I always felt those two functions should be renamed, as they are really misleading; something like ISREFERENCED would be a much better name

  • RE: Columns_Updated() in update trigger reverses the bitmask?

    I always felt those two functions should be renamed, as they are really misleading; something like ISREFERENCED would be a much better name .

  • RE: Columns_Updated() in update trigger reverses the bitmask?

    At the moment we're using an equality where clause check to determine changes between inserted and deleted which, while functional, is slower.

    i think that's the only way to do...

  • RE: after insert trigger

    Craig Farrell (9/7/2010)


    I think you're looking for something like:

    CREATE TRIGGER tr_test ON dbo.A FOR INSERT AS

    UPDATE inserted

    SET col1 = <value>

    where col1 = 'm'

    UPDATE inserted

    SET col2 = <value2>

    where col2 = 'n'

    END

    can...

  • RE: after insert trigger

    the core of the trigger is going to be something like this, but you didn't provide all the info needed. what values would col1 and col2 actually be assigned?

    UPDATE...

  • RE: Using the results of one query as the criteria in another query

    there's an article on something similar labeled "exotic joins" i think; if you search and read that, it can help you understand some of the less logical reasons to join...

  • RE: Creating a documentation

    looked like the "enhanced" version has an error in it;

    this is my slightly edited version of the same script; it runs without errors on both a 2005 and 2008 database:

    db_documentation_enhanced.txt

  • RE: Creating a documentation

    take a look at this wonderful script contribution:

    Comprehensive HTML Database Documentation(Revised)[/url]

    it produces well formatted, informative html document, which you could then copy and paste into excel, or open with excel.

    I've...

  • RE: how to check table creation statement

    i went to the trouble of creating a stored proc that does this;

    as previous posters already identified, the actual statement is never saved...all you can do is script out the...

  • RE: Login

    who created the users is not saved anywhere...with a minor exception.

    SQL does not keep track of who created or modified anything...except for a short period in the default trace.

    the...

Viewing 15 posts - 8,806 through 8,820 (of 13,469 total)