Query from Vision 7.9 to Perspective 8.1

I´m converting a query from older 7.9 Vision proyect into a Named Querie to use it in a 8.1 perspective table. But I getting this error when i try to use the Named Querie on my table
image

Is your binding just returning the word "array"?

Show us your binding. Post code using the </> button to format it.

Hi, my binding is a query I transformer to Named Queries with Ignition

See Wiki - how to post code on this forum.

SELECT * FROM
(
SELECT WR.ASSET AS SEDE,
(SELECT HAZARD FROM WORKREQUESTHAZARD WHERE COMPANY=WR.COMPANY AND WORKREQUEST=WR.WORKREQUEST ORDER BY CREATIONDATA FETCH FIRST ROW ONLY) AS HAZARD,
(SELECT HAZARDVALUE FROM WORKREQUESTHAZARD WHERE COMPANY=WR.COMPANY AND WORKREQUEST=WR.WORKREQUEST ORDER BY CREATIONDATA FETCH FIRST ROW ONLY) AS HAZARDVALUE
FROM WORKREQUEST WR LEFT JOIN WORKORDERWORKREQUEST WOWR ON WR.COMPANY=WOWR.COMPANY AND WR.WORKREQUEST=WOWR.WORKREQUEST
WHERE WR.COMPANY = :PrismaCompany AND WR.REQUESTER='PRL' AND (WOWR.WORKORDER IS NULL
OR (SELECT WORKORDERSTATE FROM WORKORDER WHERE COMPANY=WR.COMPANY AND WORKORDER=WOWR.WORKORDER) < 60)
)
PIVOT (MAX(HAZARDVALUE) FOR HAZARD IN (:HazardList))
ORDER BY SEDE

You didn't format the code! It's not difficult! See Wiki - how to post code on this forum.

  1. If you hover on the Error_Exception message what do you see?
  2. Are you using the same database engine?
1 Like

you have params in your query, but did not define any in your binding

1 Like

Ok, yes, I should define them with phyton as was done in the original proyect scripting. Still haven´t make it work but getting closer.
I think the way to pass from 7.9 to 8.1 would be:

-Convert the querys to namedQuerys with Ignition tool
-Add them to the new perspective tables
-Convert the original scripting to phyton so I can add params to my new namedQuerys

thanks.