evesely
19th July 2013, 16:19
I'm trying to query an array field in an LN table using qptool. In previous versions on Baan, if you simply put the field name it would return all of the elements. However, in LN, it only returns the first element of the array. Does anyone know the syntax for retrieving any other elements?
evesely
19th July 2013, 18:40
You have to explicitly set bind variables -- even if you don't want them.
qptool -c 123 -q "select amnt(1):a1, amnt(3):a3 from ticpr200"
vamsi_gujjula
20th July 2013, 19:47
hi evesely ,
What is this QPtool ????
bhushanchanda
20th July 2013, 22:07
Hi Vamsi,
Good morning! :)
Just made a search and found some thread's.
Thread1 (http://www.baanboard.com/baanboard/showthread.php?t=6747)
Thread2 (http://www.baanboard.com/baanboard/showthread.php?t=16158)
And some info :-
Qptool and/or bsql can be used to send queries to the database from the command line.
It is necessary to set the environment variable BSE_REM to point to the master application server in order to be able to execute qptool / bsql.
The procedure is the following:
Created a qptool script file jobstatus.txt that contains:
select jsta from ttaad500
where cjob="name of the job"
then execute the query with
qptool -f jobstatus.txt -c101
The output of that query can be redirected to a file
qptool -f jobstatus.txt -c101 > results.txt
Then it will be necessary to create a script to do the following:
1. set the environment variable BSE_REM=server where server is the master application server
2. execute the qptool command and redirect the output
qptool -f jobstatus.txt -c101 > results.txt
3. obtain (capture) the result of the query from the file results.txt
The same thing can be accomplish using bsql
bsql6.2 -q"select jsta from ttaad500" -c101
example:
create a file called query2.sql that contains
bsql6.2 -f query2.sql
then execute
bsql6.2 -f query2.sql -c101
In the porting set a tool is enclosed that can be used to start queries. When a bad
performing Baan query has been found, it can be tested with this tool. This tool
can only be started from the command prompt.
vamsi_gujjula
20th July 2013, 22:38
GM :)
you mean just like the dump files but for a particular selections
bhushanchanda
20th July 2013, 22:45
Yes,
For more info you can refer to Performance Tracing & Tuning Guide. Everything documented there. :)
Its similar to DBSLOG, SQL_TRACE, the Profiler, TT_SQL_TRACE etc.