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

Re: SBO OQCN QLastDate, QLastTime NULL for all Records - Need to reference last run time

$
0
0

Hi Derek,

I had the same problem. I solved it this way:

 

For example query

SELECT top 10 DocNum, DocDate, CardName, DocTotal from OINV order by DocDate desc

 

I used this query:

DECLARE @MyQuery nvarchar(max) = 'SELECT top 10 DocNum, DocDate, CardName, DocTotal from OINV order by DocDate desc'

EXEC sp_executesql @MyQuery

UPDATE OUQR SET QLastDate = GetDate() where cast(QString as nvarchar(max)) like '%'+@MyQuery+'%'

 

Then after each execution query, field QLastDate will be updated.

Hope helpful.

 

 

Regards,

Krzysztof


Viewing all articles
Browse latest Browse all 3229

Trending Articles



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