[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sqlite-users
Subject:    Re: [sqlite] I need to merge tables from two databases
From:       Balaji Ramanathan <balaji.ramanathan () gmail ! com>
Date:       2016-05-26 23:51:08
Message-ID: CADEh0_DOP84qESawsuBYFhz09CvF7kBOnwrNyiq-kYUed5VtAg () mail ! gmail ! com
[Download RAW message or body]

Your case statement syntax is completely off.  Also, the concatenation
operator in sqlite is ||, not +.

Try this:

insert into Customer(id)
select case when b.id = id then b.id||'A' else b.id end from customerb b

Balaji Ramanathan
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic