[Solved] Cannot save a carriage return in a Query

Creating tables and queries

[Solved] Cannot save a carriage return in a Query

Postby det » Thu Sep 20, 2018 9:33 pm

I enter the Query:
SELECT A, B, C
FROM Table
AS Name

Then I save it and close it. When I re-open the Query, I get:
SELECT A, B, C FROM Table AS Name

This is very annoying with long Queries. Is there a setting somewhere to fix it?
Thanks for any help
Det
Last edited by robleyd on Fri Sep 21, 2018 2:16 am, edited 1 time in total.
Reason: Tagged [Solved] [robleyd, Moderator]
OpenOffice 4.1.5 on Mac Sierra 10.13.1
det
 
Posts: 86
Joined: Fri Mar 31, 2017 8:24 pm

Re: Cannot save a carriage return in a Query

Postby Sliderule » Thu Sep 20, 2018 9:56 pm

det wrote:This is very annoying with long Queries. Is there a setting somewhere to fix it?

Yes.

After you open and write your Query, before you save it, either:

  1. From the Menu: Edit -> Run SQL command directly

    Make sure above has a check mark next to it

  2. From the Toolbar:

    Click on the icon: Run SQL command directly ( SQL command with a GREEN check mark )

Explanation:
  1. The above means, the Base Parser will NOT check the Query before running it, NOR before executing your Query. Therefore, you canNOT use the Query as a Parameter Query ( to prompt user for input before executing it ).

  2. Additionally, when a Query is saved to Run Directly, you CAN, if you want, add comments to the Query, by using two dashes. For example:
    Code: Select all   Expand viewCollapse view
    -- This Query is to be saved and run directly withOUT the Base Parser being involved
    SELECT
       A, -- This column will display the information from A
       B,
       C
    FROM Table AS Name  -- This is an example of the tables I want to use

I hope this helps, please be sure to let me / us know.

Sliderule

Thanks to add [Solved] in your 1st post Subject (edit button top right) if this issue has been resolved.
User avatar
Sliderule
Volunteer
 
Posts: 1161
Joined: Thu Nov 29, 2007 9:46 am

Re: Cannot save a carriage return in a Query

Postby det » Thu Sep 20, 2018 10:30 pm

Solved
Thanks so much for detailed explanation. Works perfectly.
OpenOffice 4.1.5 on Mac Sierra 10.13.1
det
 
Posts: 86
Joined: Fri Mar 31, 2017 8:24 pm


Return to Tables & Queries

Who is online

Users browsing this forum: No registered users and 3 guests