Code: Select all
eg:
SELECT
xxxxx,
xxxxx
WHEN
xxxxx
FROM
xxxxx
Cheers
Code: Select all
eg:
SELECT
xxxxx,
xxxxx
WHEN
xxxxx
FROM
xxxxx
Code: Select all
-- Query to return items based on the value of "MyField"
-- Just wanted to add some comments to show how they might look
SELECT
"MyTable1"."MyField1" as "Sample",
"MyTable2"."MyField6" as "Have a nice day"
FROM "MyTable1",
"MyTable2"
WHERE "MyTable1"."MyField" = "MyTable2"."MyField" -- Another comment for the fun of it
Yes.Matt123 wrote:Do I need to learn to use VIEW (recall seeing it mentioned somewhere?)
Sliderule wrote:Put another way, if you send the SQL directly to the database engine, Base will keep it exactly as you have written it.
Exactly. OpenOffice / LibreOffice Base is the database front-end, NOT the database back-end ( such as, HSQL, MySql, Access, H2, SQLite, PostGreSQL, etc ). Tables and Views are stored ( as part of ) the database driver, that is, the database back-end. That way, you can use it, ( your data, tables, views etc ) outside of OpenOffice / LibreOffice Base when it is configured correctly.Ridgeland wrote:I just ran in circles and finally discovered that when your query uses another query rather than a table then
"Run SQL Command Directly"
gives cryptic error messages that don't make any sense to me.
But turn off the "Run SQL Command Directly" and save the query and voila it works.
Why make it so hard to have your sql statement be formatted in a human friendly way??!!
Just as an FYI ( For Your Information ) and, for others reading this forum post.Ridgeland wrote:The () works for me. I don't care for creating a view by going back into the GUI click and drag setup.