some time ago, I decided to solve a PG-related problem with this my question . This mainly concerns the use of row_number over the section in 8.4.
Unfortunately, now I have to create the same thing for 8.2, since one of my clients is on 8.2 and needs it desperately.
What I know (on 8.4) is the following:
SELECT custId, custName, 'xyz-' || row_number() OVER (PARTITION by custId) AS custCode
Basically counting custId events and assigning custCodes from this. (just an example to show that, of course, the question is more complicated)
I thought about the solutions mentioned above, but did not get them because there is one more obstacle. I do not run SQL directly, I have to paste it into the xml-based configuration file, which creates a specific XML format from the Results query. Therefore, creating temp or temp routines is not really an option.
So, the question is: do any of you guys have an idea how to transfer this solution of mine to PG 8.2?
TIA
TO
source share