Hi ALL,
I need to know how to insert the column values into a table by validating some of the columns which is accepting a bad data.
For e.g., If I have a column called "MobileNo" and some one tries to insert the value that exceeds 10 digits in "MobileNo" field, then how to check for the validation(using IF-ELSE or whatever).
My Query(SP) is here:
INSERT INTO dbo.FTA_ReportFileDumpNew
select A.MobileNo,A.CustomerName,A.Product,A.Suk_Type,A.FTR_Date,A.FTA_Date,
A.Sim_No,A.IMSI_No,A.Retailer_No,A.RetailerName,A.MacMobile_No,A.MacPrimary,
A.MacLocation,A.HUB,A.CombinedZone,A.TM_Name,A.TM_Number,A.RETAILER_SMS_DATE,
A.CUSTOMER_SMS_DATE,A.[TAT/Hrs],A.[TAT/Mins],A.MinuteWiseData,0,@UploadedBy,GETDATE()
FROM dbo.FTA_ReportFileDump A where exists
(select 1 from FTA_ReportTbView B
where A.MobileNo = B.MobileNo)
Any help or suggestion greatly appreciable.
Regards,
Raj