on 11-20-2015 2:26 PM
I need to be able to reference the last time queries were used in Business One. From what I have gathered, for that I should reference OUQR. When I view all the data for queries in that table, I noticed that for every record the fields QLastDate and QLastTime are NULL. Why is that? Is there somewhere else I can look to get the last time a query was used? Thanks
Hi Derek,
You can able to search all the query in OUQR table , by below command ...
Select * from OUQR in Query Generator
But Suppose you want more details about the columns details in that table then run below query in query generator..
SP_Columns 'OuQR'
This Query result explained every details about the fields. you will found QlastDate & QLastTime is set by IS_NULLABLE by SAP default.
I hope it will help for you...
Rgds,
Kamlesh Naware
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.