Hi Alex,
I have defined two tests like the following. The purpose of this test is to run an Oracle query and email me the result of the query.
1. I have defined one test which will calculate a count from my Oracle database and insert it into a table.
2. The second test is dependent on the above test and after the first test is executed this will run a ODBC query (Test method = ODBC Query) as follows:
select count(*) from <tablename> where ........
This test is defined with an action profile which will send an email with the message body = %Reply%.
When I tried to run these tests, I got the email but the message body is saying 78 ms (which I am thinking is the time it took for the count to come back) whereas I am expecting the message body to say something like 100000 which is the resultant count from the ODBC query. How will I be able to achieve this ?
Thanks.
Get ODBC Query result in email message body
Ok, now that worked fine.
My initial query was
select demcnt from demcounts;
and when I checked the option of "Alert when ...." I was able to get the count value in %Reply%.
My question now is
I want to update my query like
select demcnt, timestamp from demcounts;
Now how can I achieve receiving both the values in %Reply%.
Thanks for all your help.
My initial query was
select demcnt from demcounts;
and when I checked the option of "Alert when ...." I was able to get the count value in %Reply%.
My question now is
I want to update my query like
select demcnt, timestamp from demcounts;
Now how can I achieve receiving both the values in %Reply%.
Thanks for all your help.
You may use concatenation for these fields, e.gvidyagana wrote:I want to update my query like
select demcnt, timestamp from demcounts;
Now how can I achieve receiving both the values in %Reply%.
select Str(demcnt)+' '+Convert(varchar,timestamp) from demcounts
What exactly Database server do you use? You should use appropriate function instead of Str and Convert, if your database server does not support them.
Regards,
Yoorix