I want to insert those value also which have version null and and for version null i don't have status.
i am getting all datat from datatable to procedure table type and then how i check that the comming data has version null or not.
USE [LAndingPAgeitems_testDB]
GO
/****** Object: StoredProcedure [dbo].[uspInsertFilterData] Script Date:02/20/2016 16:53:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER Procedure [dbo].[uspInsertFilterData]
@sqlDataTable SqlTableType READONLY
as
Begin
if (@sqlDataTable.Version is NOT NULL or @sqlDataTable.Version != '')
Begin
Insert into FilterCombination (Product,Version,HotFix,Resourcetype,Language) (Select t1.Product,t1.Version,t1.HotFix, t1.Resourcetype, t1.Language from @sqlDataTable t1 , Product_Version_Mapping t2 where t1.Product = t2.Product and t1.Version = t2.Version and t2.Status = 'Correct')
End
Else
Begin
Insert into FilterCombination (Product,Version,HotFix,Resourcetype,Language) (Select t1.Product,t1.Version,t1.HotFix, t1.Resourcetype, t1.Language from @sqlDataTable t1 , Product_Version_Mapping t2 where t1.Product = t2.Product);
End
End
this query is not working. Please help
Aucun commentaire:
Enregistrer un commentaire