This is the code in the instead of insert trigger
ALTER TRIGGER [Cust_Audit] ON [dbo].[Customer]
INSTEAD OF INSERT
AS
DECLARE @CustNum int
DECLARE @CustomerCode INT,@CustomerId entificationTyp e INT
DECLARE @CustomerIdenti ficationGroupCo de CHAR(50),@Docum entNumber CHAR(50)
DECLARE @FirstName CHAR(50),@LastN ame CHAR(50),@Middl eName CHAR(50)
DECLARE @CustomerName CHAR(50)...
User Profile
Collapse
-
-
While Loop
Hi All
I need some help again. I am using a instead of insert to update and insert records. When I am doing multiple records i get am error
Subquery returned more than 1 value. This is not permitted when the
subquery follows =, !=, <, <=, <, >= or when the subquery is used as an
expression.
So i am thinking of using a cursor to do this.
Am i right in wanting to use... -
Trigger ISSUE
I have a problem that i cant seem to find out why i am getting this error when updating table I am get error saying cant in NULL in field name CreateByUser.
I am using a INSTEAD OF INSERT Trigger. This trigger is triggered from a store procedure with the information is transfer via a XML file. The insert of a new record is done without any problem. Can someone help Below is the update code
BEGIN
UPDATE Customer... -
Trigger problem
[CODE=sql]SET QUOTED_IDENTIFI ER ON
GO
SET ANSI_NULLS ON
GO
ALTER TRIGGER [Cust_Audit] ON [dbo].[Customer]
INSTEAD OF INSERT
AS
DECLARE @CustNum int
DECLARE @CustomerCode INT,@CustomerId entificationTyp e INT
DECLARE @CustomerIdenti ficationGroupCo de CHAR(50),@Docum entNumber CHAR(50)
DECLARE @FirstName CHAR(50),@LastN ame CHAR(50),@Middl eName CHAR(50)
... -
Delerna suppose i want to place the slection in a temp table where would i put the INSERT INTO #TEMPLeave a comment:
-
I did what u said i should do and the error went somewhere else the error now look like this
Msg 4104, Level 16, State 1, Line 1
The multi-part identifier "D.TransactionT ype" could not be bound.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'TransactionId' .
Msg 4104, Level 16, State 1, Line 1
The multi-part identifier "T.TransactionD ate" could not be bound.
Msg 4104, Level...Leave a comment:
-
Incorrect Syntax at RTRIM copy and paste it in query and you will see the error
thanks in advanceLeave a comment:
-
Syntax error in the case statment
I am have a problem with this section of code. When I place the select statemnet in a string variable i get an syntax error at RTRIM. Can the Case section be used in a string variable i am wondering
Cust_Org_Name =
CASE WHEN C.CustomerType ='+'I'+'THEN RTRIM(CL.Lastna me)
WHEN C.CustomerType = '+'E'+'THEN RTRIM(CL.Custom ername)
END,
Thanks for your assistance -
-
SQL Syntax Error
[code=sql]
Declare @String as nVarChar(1000)
Declare @Ind as Char(1),@Com as Char(1),@BAC3 as Char(1)
Declare @BAC1 as Char(1),@BAC2 as Char(1),@BAC4 as Char(1)
Declare @current as varChar(7),@sav ing as varChar(6)
Declare @move as varChar(12),@Ot her as varChar(5)
Declare @new as varChar(3),@old as varChar(3),@bac k as varChar(10)
set @Ind = 'I'
set @Com = 'E'
set @BAC1...
No activity results to display
Show More
Leave a comment: