J
J
jasta312016-08-14 23:07:29
MySQL
jasta31, 2016-08-14 23:07:29

How to solve an error, syntax error in a complex query?

How to handle given query in SQLITE if it works in MySQL?
select u.name,
concat(
a1.postal_code, ', ',
a1.country, ', ',
a1.city, ', ',
a1.district, ', ',
a1.street, ', ',
a1.building_number , ', ',
a1.postal_code) as address1,
concat(
a2.postal_code, ', ',
a2.country, ', ',
a2.city, ', ',
a2.district, ', ',
a2.street, ', ',
a2.building_number, ', ',
a2.postal_code) as address2,
concat(
a3.postal_code, ', ',
a3.country,
a3.district, ', ',
a3.street, ', ',
a3.building_number, ', ',
a3.postal_code) as address3,
from new.users u
left join old.pyramid_address a1 on (u.filter_address = a1. id)
left join old.pyramid_address a2 on (u.living_address = a2.id)
left join old.pyramid_address a3 on (u.passport_address = a3.id)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anatoly, 2016-08-14
@taliban

Are you selecting data from two databases?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question