Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9146

Re: Stored Procedure for Duplicate Serial Number!!

$
0
0

Hi,

 

Try this

 

IF (@object_type='10000045') and (@transaction_type='A' or @transaction_type='U')

begin

  if exists ( select Itemcode from OSRN where AbsEntry =@list_of_cols_val_tab_del  and DistNumber in (select  DistNumber from  OSRN where AbsEntry <>@list_of_cols_val_tab_del))

  select @error =6, @error_message ='Serial exists ' + ( select top 1 DistNumber from OSRN where AbsEntry =@list_of_cols_val_tab_del  and DistNumber in (select DistNumber from  OSRN where AbsEntry <>@list_of_cols_val_tab_del))

end

 

Hope this helps,

TVSon


Viewing all articles
Browse latest Browse all 9146

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>