@name = value 
Author Message
 @name = value



Mon, 02 Mar 1998 03:00:00 GMT
 @name = value


- I am writing a trigger to add rows to a table of fees baseed
- on changes in a table of dealers. The trigger makes several calls
- to a stored procedure, passing parameters. When compiling, I get
- and error message:
-



-

- I don't understand this message, nor how to correct it. Any direction or
- clarification would be appreciated. Relevant code follows:
-
- -- Trigger to update the timestamp and allocate fees for a dealer
...

          ^^^^^


--

Q Vincent Yin                   |       Repeat

                                |       Until 0 = 1;



Mon, 02 Mar 1998 03:00:00 GMT
 @name = value
I am writing a trigger to add rows to a table of fees baseed
on changes in a table of dealers. The trigger makes several calls
to a stored procedure, passing parameters. When compiling, I get
and error message:





I don't understand this message, nor how to correct it. Any direction or
clarification would be appreciated. Relevant code follows:

-- Trigger to update the timestamp and allocate fees for a dealer
create trigger t_dealer_iu on dealer
for insert, update
as









-- Declare the cursor for multiple row updates.
DECLARE dlr_upd_curs CURSOR
FOR SELECT inserted.dealer_id, inserted.status
        FROM inserted,deleted
        WHERE inserted.dealer_id = deleted.dealer_id

-- Declare the cursor for multiple row inserts.
DECLARE dlr_ins_curs CURSOR
FOR SELECT dealer_id, status FROM inserted
        WHERE inserted.dealer_id NOT IN
        (SELECT dealer_id FROM deleted)


-- either an insert or an update has occurred
        begin


        from inserted, deleted
        where inserted.dealer_id = deleted.dealer_id


        -- it is an update, do all of the timestamps
                begin

                        begin
                        update dealer
                        set sys_datetime = getdate(), userid = user_name()
                        from inserted
                        where dealer.dealer_id = inserted.dealer_id
                        end
                else
                        begin
                        raiserror 30001
                        rollback trigger
                        end
                -- Check for single row update on status

                        begin


                        FROM inserted

                                begin
                                -- An inactive dealer has been made active


                                end
                        end
                else
                        -- It is a multi-row update, use the cursor
                        begin
                        open dlr_upd_cursor



                                begin

                                        begin
                                        -- An inactive dealer has been made active


                                        end

                                end
                        close dlr_upd_cursor
                        deallocate cursor dlr_upd_cursor
                        end



Mon, 02 Mar 1998 03:00:00 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. name/value pairs in a table, need help with reporting techniques

2. Extracting name value pairs from an XML string

3. PL/SQL Code: Parsing Name Value Pairs.

4. Issue with SPs returning name-value pairs

5. Issue with SPs returning name-value pairs

6. Modelling items with attribute name/value pairs

7. How to pivot a table of name/value pairs based on the lastest timestamp for a given pair?

8. Using the values of fields as column name

9. encrypted value for the name package and server

10. Transforming Row of Data to Multiple Column Name Field Values

11. Replacing a table name with a stored procedure parameter value

12. DB Name AND Field Value As StorProc Params


 
Powered by phpBB® Forum Software