On Tuesday, August 20, 2013 3:06:24 AM UTC-5, Nicolas Évrard wrote:
>
> * Robert Schöftner [2013-08-20 09:30 +0200]:
> >Am 2013-08-20 01:43, schrieb Demoy Blake:
> >> Hello, I am trying to change the address of a party using the database
> >> cursor, below is the SQL statement but its not working.
> >>
> >> cursor.execute('UPDATE party_address '
> >> 'SET country = 111, '
> >> 'street = "pen" '
> >> 'WHERE party = 111')
> >>
> >> #below is the error message i keep receiving
> >>
> >> res = self.cursor.execute(sql)
> >> psycopg2.ProgrammingError: column "pen" does not exist
> >> LINE 1: UPDATE party_address SET country = 111, street = "pen" WHERE...
> >>
> >postgresql expects single quotes for string-literals, double quotes for
> >column/table names.
>
> One might also wonder why Demoy would like to bypass Tryton's ORM.
> It is usually a bad idea.
>
> --
> Nicolas Évrard
>
> B2CK SPRL
> 4, rue de Rotterdam
> 4000 Liège
> Belgium
> Tel: +32 472 54 46 59
> E-mail/Jabber: [email protected] <javascript:>
> Website: http://www.b2ck.com/
>
thank you for the advice, Hi Évrard how might I alter a specific party
address without resulting to sql statements