On 2018-05-25 17:04:25 +0800, tango ward wrote:
>
>
> I want to insert data from mysql into a table in postgresql. I want to check
> when the subjectcode contains PE or NSTP so I can assign True or False to
> another column in destination DB.
>
>
> # Source data:
>
> # Source data: MySQL
>
On Fri, May 25, 2018 at 10:19 PM, Adrian Klaver
wrote:
> On 05/25/2018 07:05 AM, Adrian Klaver wrote:
>
>> On 05/25/2018 06:52 AM, Adrian Klaver wrote:
>>
>>> On 05/25/2018 02:04 AM, tango ward wrote:
>>>
I want to insert data from mysql into a table in postgresql. I want to
c
On Fri, May 25, 2018 at 11:04 AM, tango ward wrote:
> CASE
> WHEN code like '%%PE%%' or code like '%%NSTP%%'
> THEN True
> ELSE False
I cannot advise you on the %% stuff, which I do not totally understand, but
CASE WHEN condition
On 05/25/2018 07:05 AM, Adrian Klaver wrote:
On 05/25/2018 06:52 AM, Adrian Klaver wrote:
On 05/25/2018 02:04 AM, tango ward wrote:
I want to insert data from mysql into a table in postgresql. I want
to check when the subjectcode contains PE or NSTP so I can assign
True or False to another
On 05/25/2018 06:52 AM, Adrian Klaver wrote:
On 05/25/2018 02:04 AM, tango ward wrote:
I want to insert data from mysql into a table in postgresql. I want to
check when the subjectcode contains PE or NSTP so I can assign True or
False to another column in destination DB.
# Source data:
On 05/25/2018 02:04 AM, tango ward wrote:
I want to insert data from mysql into a table in postgresql. I want to
check when the subjectcode contains PE or NSTP so I can assign True or
False to another column in destination DB.
# Source data:
# Source data: MySQL
curr_msql.execute(''
On Friday, May 25, 2018, tango ward wrote:
>
> WHEN code like '%%PE%%' or code like '%%NSTP%%'
>
> I am getting TypeError: not all arguments converted during string
> formatting.
>
> Any advice pls?
>
Unclear how to inject percent signs in the query string here. I'd just
avoid them and