Skip to Content
0
Former Member
Mar 22, 2014 at 07:43 AM

Req:validtion query for sales quotation

27 Views

Hi,

I would like to put validation for sales quotation when Freight1 Tax Code at line level is not empty

My query is:

if @object_type ='23' and @transaction_type in ('A','U')

begin

if exists(SELECT * FROM [dbo].[OQUT] T0 INNER JOIN QUT2 T1 ON T0.DocEntry = T1.DocEntry

INNER JOIN QUT1 T2 ON T0.DocEntry = T2.DocEntry

WHERE T1.TaxCode is not null and T0 .DocEntry = @list_of_cols_val_tab_del and

T2 .DocEntry =@list_of_cols_val_tab_del )

select @error=N'001'

select @error_message =N'Freight1 Tax code should be empty.'

end

but didnot get the result.Plz give the solution.