Hi I have just managed to set up Mariadb and created a new table and managed to over come the problem of JCDB connector! All with the help of previous posts on this site. I wanted to move/migrate my existing Database from embedded to Mariadb!
I have copied all the the tables (including views of queries) all the 97 queries, forms and reports, and pasted them into the new base all went well except the views which have not seemed to work.
Any way on to my problem,
SELECT * FROM ( SELECT "ID", "DEBIT", "CREDIT", CASE WHEN "CREDIT" IS NULL THEN 0 ELSE "CREDIT" END - CASE WHEN "DEBIT" IS NULL THEN 0 ELSE "DEBIT" END "Solde" FROM "General" LEFT JOIN ( SELECT "Debit", SUM( "MONGENDEB"."Montant" ) "DEBIT" FROM "MONGENDEB" WHERE "PID" = :AN GROUP BY "Debit" ) "A" ON "General"."ID" = "A"."Debit" LEFT JOIN ( SELECT "Credit", SUM( "MONGENCRED"."Montant" ) "CREDIT" FROM "MONGENCRED" WHERE "PID" = :AN GROUP BY "Credit" ) "B" ON "General"."ID" = "B"."Credit" ) WHERE "ID" = '764000'
This query worked perfectly well in the embedded base but not on the new mariadb,
MONGENCRED and MONGENDEB are table views of queries,
Any help will be greatly appreciated
Regards
Paul
Edit
I have corrected the two table views which are used here, and I have also tried to replace the tables with the actual queries, but I get the same message.
Edit
When I copied all the tables into the new mariadb base they all appear a if they are sub tables of a main table?
Is this normal? and if not how do I correct it.
EDIT Queries that work from the main tables (eg DATA) work with no problems, only queries that are based on other queries or there table views are having problems.