Viewing 15 posts - 166 through 180 (of 238 total)
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...
January 15, 2003 at 2:04 pm
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...
January 14, 2003 at 6:29 pm
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...
January 10, 2003 at 4:52 pm
Thanks to everybody. Excel's control satisfies my initial requirement.
January 10, 2003 at 11:54 am
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.
January 9, 2003 at 6:17 pm
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...
January 9, 2003 at 6:13 pm
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...
January 9, 2003 at 1:40 pm
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...
January 9, 2003 at 12:16 pm
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...
January 9, 2003 at 12:07 pm
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...
January 8, 2003 at 2:31 pm
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...
January 8, 2003 at 1:13 pm
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...
January 8, 2003 at 11:43 am
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...
January 7, 2003 at 5:49 pm
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...
January 7, 2003 at 3:29 pm
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...
January 7, 2003 at 2:37 pm
Viewing 15 posts - 166 through 180 (of 238 total)