I'm using an Oracle legacy database and can't add a primary key to a table with none, so I am using ROWID as the primary key so sqlalchemy has a unique id.
I'm also using (attempting to use) this table pornographically (Concrete Table Inheritance). The trouble I'm having is that Oracle complains about the UNION because the "primary key" Unicode(255) is really a ROWID. So, I have something like this: SELECT * FROM a.a_id, /*really a ROWID */ ... ... UNION ALL CAST(NULL AS VARCHAR(255)) as a_id, ... ... Oracle is not happy because VARCHAR(255) isn't the same TYPE as ROWID. I was speculating I could solve this by using a User Defined Type. Is there a way I could accomplish either: SELECT * FROM CAST(a.a_id AS VARCHAR(255)) as a_id, /*really a ROWID */ ... ... UNION ALL CAST(NULL AS VARCHAR(255)) as a_id, ... ... === OR === SELECT * FROM a.a_id, /*really a ROWID */ ... ... UNION ALL CAST(NULL AS ROWID) as a_id, ... ... Aside from this, I would want the User Data Type to act in all other ways like Unicode. Thank you very much in advance. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.