atuljadhavnetafim
Active Member
- Joined
- Apr 7, 2012
- Messages
- 341
- Office Version
- 365
- Platform
- Windows
Dear Expert
i have 6 table in SQL Server and i have created one View ("View_1") and in that i have one column name ("PayerCustomer")
i want value in this column which merge two column like Column name "Payer" and second column "Customer"
e.g in Payer column have Value "Atul"
and in Customer Column have value "Jadhav"
then i want to merge this two value and want result in "PayerCustomer" like "AtulJadhav"
and if Second Column is blank then it give me value like "AtulAtul"
so i have tied below code but it is not wokring
CREATE TRIGGER Trg_View_1
ON View_1
FOR INSERT, UPDATE
AS
UPDATE View_1 SET payerCustomer = payer + ISNULL (Customer, Payer)
GO
please help
i have 6 table in SQL Server and i have created one View ("View_1") and in that i have one column name ("PayerCustomer")
i want value in this column which merge two column like Column name "Payer" and second column "Customer"
e.g in Payer column have Value "Atul"
and in Customer Column have value "Jadhav"
then i want to merge this two value and want result in "PayerCustomer" like "AtulJadhav"
and if Second Column is blank then it give me value like "AtulAtul"
so i have tied below code but it is not wokring
CREATE TRIGGER Trg_View_1
ON View_1
FOR INSERT, UPDATE
AS
UPDATE View_1 SET payerCustomer = payer + ISNULL (Customer, Payer)
GO
please help