Forum Replies Created

Viewing 15 posts - 166 through 180 (of 238 total)

  • RE: Preferred method error handling in SP ??

    I do this:

    IF @@ERROR <> 0 GOTO error_handler

    after every SQL statement that modifies DB (CREATE, DROP, INSERT, UPDATE, DELETE, TRUNCATE, etc.).

    At the end of each SP I have the error_handler...

  • RE: how to concatenate values?

    To concatenate an entire column together use the foloowing code. To accomplish your task you may want to do something more advanced but here is a main idea:

    DECLARE@rowVARCHAR( 1000 )

    SET@row...

  • RE: Parameter creation to do a sublist match

    Tim, what you are ending up doing is something like this:

    SELECT * from tablename where columname IN ( 'item1, item2' )

    or something like this:

    IN( '"item1, item2"' ) and so...

  • RE: View Cube outside of Analysis Manager

    Thanks to everybody. Excel's control satisfies my initial requirement.

  • RE: "how to insert" puzzle

    Also, nested triggers have to be enabled for the entire database - a very dangerous thing if you had not carefully designed for this behavior from the start.

  • RE: "how to insert" puzzle

    Seems like nested triggers (on product and invoice header tables) will solve the problem if you use the inserted table inside of each trigger.

    To avoid using trigger and do it...

  • RE: "how to insert" puzzle

    I am sure it is accessible by using @@IDENTITY. But again, put it all in one stored procedure and read @@IDENTITY right after an INSERT statement (into product table...

  • RE: "how to insert" puzzle

    You can insert records into the desired tables in the INSERT trigger on the product table. It will garantee you that in case of any INSERT into product teo other...

  • RE: I didn't ask for a work table...

    Based on the error message, it seems you are trying to sort by a column of TEXT or NTEXT type. It is not possible. Convert to VARCHAR or NVARCHAR and...

  • RE: Diagrams and Documentation

    You can write a report generator yourself. You just query system tables (sysobjects, etc.) and output data in the format you wish. You can output to XML, Word or any...

  • RE: Diagrams and Documentation

    Use AllFusion Data Modeler (formerly ERwin) from computer Associates. In particular, you need the Reverse Engineer feature. Unfortunately, you must spend about $2K to get one user license.

    I will...

  • RE: Default Values and Named Parameters for Stored Procs

    Just one little drawback of using default values for SP parameters...

    Think of default values as you think of late binding in programming languages. If you forgot to specify a...

  • RE: Using DateTime column in where clause

    The method Antares686 suggested works of course but it won't use index on the dates column if such exists because there is a function applied to the column. I am...

  • RE: Need to append to text variable

    I agree. Find a better design solution. Passing long strings to stored procedures and manipulating their is similar to coding business logic in stored procedures. It is generally a bad...

  • RE: A newbie question about db design

    Tomi, that is the best way.

    You are talking about many-to-many relationship in this case. There are three logical types of relationships: one-to-one, one-to-many, many-to-many. The last one is suported by...

Viewing 15 posts - 166 through 180 (of 238 total)