Passing the Maximo Where Clause to an asp web page
#3
Posted 01 March 2012 - 11:50 AM
johnw, on 01 March 2012 - 11:31 AM, said:
Thanks johnw for the reply,
I tried this and it didn't work.
SQL = "SELECT PO.* FROM PO WHERE " + params["where"]
In fact I want to retrieve the where used by maximo to show selected PO
for example if maximo have (where PONUM like '14059%')
The sql in my asp web page will have the same clause where
SQL = "SELECT PO.* FROM PO WHERE PONUM like '14059%'
Thanks
#4
Posted 01 March 2012 - 12:56 PM
Give that a try. I seem to recall that Maximo will add and AND to everything in its where clause. I don't have a copy of Maximo handy to give it a try. Also, you can refer to the report in the Maximo examples directory, they show how that mechanism work. Or you can use the extract report tool to get a existing report.
#5
Posted 01 March 2012 - 04:26 PM
johnw, on 01 March 2012 - 01:56 PM, said:
Give that a try. I seem to recall that Maximo will add and AND to everything in its where clause. I don't have a copy of Maximo handy to give it a try. Also, you can refer to the report in the Maximo examples directory, they show how that mechanism work. Or you can use the extract report tool to get a existing report.
Use params["where"].value. Also it does not include a preceding 'AND', so it should be :
SQL = "SELECT PO.* FROM PO WHERE " + params["where"]
#6
Posted 02 March 2012 - 06:57 AM
It still not working. I put the [where] parameter in the report to show his value and it was
((po.poid = 1042))
I tried without succes all this:
SQL = "SELECT PO.* FROM PO where 1=1 " & params["where"]
SQL = "SELECT PO.* FROM PO where 1=1 " + params["where"]
SQL = "SELECT PO.* FROM PO where 1=1 and " & params["where"]
SQL = "SELECT PO.* FROM PO where 1=1 and " + params["where"]
SQL = "SELECT PO.* FROM PO where " & params["where"]
SQL = "SELECT PO.* FROM PO where " + params["where"]
#7
Posted 02 March 2012 - 07:10 AM
Riad, on 02 March 2012 - 07:57 AM, said:
It still not working. I put the [where] parameter in the report to show his value and it was
((po.poid = 1042))
I tried without succes all this:
SQL = "SELECT PO.* FROM PO where 1=1 " & params["where"]
SQL = "SELECT PO.* FROM PO where 1=1 " + params["where"]
SQL = "SELECT PO.* FROM PO where 1=1 and " & params["where"]
SQL = "SELECT PO.* FROM PO where 1=1 and " + params["where"]
SQL = "SELECT PO.* FROM PO where " & params["where"]
SQL = "SELECT PO.* FROM PO where " + params["where"]
This is the correct one:
SQL = "SELECT PO.* FROM PO where " + params["where"].value
Why it is not working I do not know. What error are you getting?
#8
Posted 05 March 2012 - 06:23 AM
Sorry for the delai, I'm not working full time on this issue.
It didn't work with SQL = "SELECT PO.* FROM PO where " + params["where"].value
It shows me HTTP 5000 error.
But when I use SQL = "SELECT PO.* FROM PO where po.ponum = '" & 13056218 & "'"
It works fine.
Thanks
#15
Posted 05 March 2012 - 10:34 AM
mblock, on 05 March 2012 - 09:22 AM, said:
"http://ServerName/main.asp?where= " + params["where"].value
Ok the where is passing ... Thank you very much ...
Still a little issue, the where is using the poid not the ponum and the SQL is not recognising the POID
this is the error: ORA-00904: "PO"."POID": invalid identifier
Do you have a idea why ?
The where I retrieve within the asp is ( ( po.poid = 1042 ))
Thanks






MultiQuote









