Menu

#1 Getting Error Message I can't figure out

open
nobody
None
5
2003-08-19
2003-08-19
Anonymous
No

Here is my query string: It works fine from the psql
prompt, but fails when I do handle.execute() on it.

SELECT s.id,
cwajga_magic_number((cwajga_product(r.rating) ^ (1 /
1)), MAX(lastplay.lastheard), 10, 1061265038) as magic
INTO TEMP magic_order
FROM song AS s LEFT OUTER JOIN rating AS r ON s.id =
r.song LEFT OUTER JOIN lastplay ON lastplay.song = s.id
WHERE r.name IS NULL or r.name ILIKE 'omega697'
GROUP BY s.id;

SELECT SUM(magic) as total INTO TEMP magic_tot FROM
magic_order;

SELECT id, 100.0*magic/total as percent
FROM magic_order, magic_tot
order by percent DESC;

It gives me the following parser error:

DBI::ProgrammingError: ERROR: parser: parse error at
or near 1 at character 66

I totally don't get that parse error when I input it
directly, though, so I don't know what the heck is
going on.

-Kurt

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.