cancel
Showing results for 
Search instead for 
Did you mean: 

problem with user defined approval query

felipe_loyolarodriguez
Active Contributor
0 Kudos

Hi

Sorry me for my english

I have a problem with approval query


DECLARE @DocDate DATETIME
SET @DocDate = (SELECT $[OINV.DocDate])

IF (DATEDIFF(DAY,@DocDate,GETDATE())) != 0

BEGIN
SELECT DISTINCT 'TRUE'
END

the query works with the previous invoices, but today's invoices show me a error colud not commit transaction

Can Help me?

Thanks

Felipe Loyola

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Felipe Loyola,

Try this:

SELECT DISTINCT 'TRUE' FROM OINV T0

WHERE DATEDIFF(DD,T0.DocDate,GETDATE()) != 0 AND T0.DocNum = '$[$8.0.0\]'

Thanks,

Gordon

felipe_loyolarodriguez
Active Contributor
0 Kudos

Thanks Gordon

I solved differently

Regards

Answers (0)