On Jan 25, 2011, at 6:44 PM, Royce wrote: > Ok, Thanks for all your help ,I have found a solution as shown below > > class Course(Base): > __tablename__ = 'Course' > > course_id = Column(INTEGER()) > course_code = Column(VARCHAR(length=4)) > > The line below works. > course_name = > column_property(select([func.CONCAT(course_code,course_num)])) > > How ever this next line doesn't work even thought the docs seem to > imply that it should work. > course_name = column_property(course_code + course_num) >
column_property(cast(course_code, String) + course_num) would work, or just column_property(func.concat(...)). the select() shouldn't be needed. > Cheers > Royce > > -- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To post to this group, send email to sqlalchemy@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. > -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@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.