Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DTP » Formatting SQL
Formatting SQL [message #44129] Tue, 22 April 2008 03:34 Go to next message
Eclipse UserFriend
Originally posted by: eclipsenews.20.epm.spamgourmet.com

Even though there is a 'Format SQL' function available under the Edit
menu when editing a SQL scrapbook... it doesn't appear to do anything.
Have I got something misconfigured?

Also, the content assist is pretty good at suggesting standard SQL
keywords, however it seems it would be much more useful if it could
content assist table and field names. Is that possible, or a feature
that is planned?

Cheers
Tom
Re: Formatting SQL [message #44191 is a reply to message #44129] Tue, 29 April 2008 13:24 Go to previous messageGo to next message
Enrico Schenk is currently offline Enrico SchenkFriend
Messages: 23
Registered: July 2009
Junior Member
Hello Tom,

Can you tell us which version of DTP/Eclipse and which database you are
using?

Thanks,
Rico

PS:
If I remember right, the "Format SQL" function should change all
registered keywords of your database dialect to upper case. To make this
work you have to set at least the database type for the scrapbook.
Re: Formatting SQL [message #44219 is a reply to message #44191] Thu, 01 May 2008 00:30 Go to previous message
Eclipse UserFriend
Originally posted by: eclipsenews.20.epm.spamgourmet.com

Hi Enrico,

Thanks for your reply. I am using Eclipse 3.3.2 with DTP 1.5.2 and
PostgreSQL 8.2.4.

Format SQL does not appear to do anything, not even uppercase the SQL
keywords, even though I have set the database type for the scrap book.
It does autocomplete the keywords though.

I often have to deal with dumps of queries that are long with many
subqueries, and which are largely unreadable. I was kind of hoping the
format sql feature might split queries into multiple lines with
indenting. When I code complicated queries I often format them something
like this:

SELECT
something,
somethingelse,
(
SELECT
athirdthing
FROM
thirdtable
) as thirdthing
FROM
sometable
INNER JOIN someothertable
WHERE
this = that;

Etc. Is anything like that planned for the future? Could I submit a
feature request?

Cheers
Tom

Enrico Schenk wrote:
> Hello Tom,
>
> Can you tell us which version of DTP/Eclipse and which database you are
> using?
>
> Thanks,
> Rico
>
> PS:
> If I remember right, the "Format SQL" function should change all
> registered keywords of your database dialect to upper case. To make this
> work you have to set at least the database type for the scrapbook.
Re: Formatting SQL [message #591035 is a reply to message #44129] Tue, 29 April 2008 13:24 Go to previous message
Enrico Schenk is currently offline Enrico SchenkFriend
Messages: 23
Registered: July 2009
Junior Member
Hello Tom,

Can you tell us which version of DTP/Eclipse and which database you are
using?

Thanks,
Rico

PS:
If I remember right, the "Format SQL" function should change all
registered keywords of your database dialect to upper case. To make this
work you have to set at least the database type for the scrapbook.
Re: Formatting SQL [message #591052 is a reply to message #44191] Thu, 01 May 2008 00:30 Go to previous message
Tom Walter is currently offline Tom WalterFriend
Messages: 8
Registered: July 2009
Junior Member
Hi Enrico,

Thanks for your reply. I am using Eclipse 3.3.2 with DTP 1.5.2 and
PostgreSQL 8.2.4.

Format SQL does not appear to do anything, not even uppercase the SQL
keywords, even though I have set the database type for the scrap book.
It does autocomplete the keywords though.

I often have to deal with dumps of queries that are long with many
subqueries, and which are largely unreadable. I was kind of hoping the
format sql feature might split queries into multiple lines with
indenting. When I code complicated queries I often format them something
like this:

SELECT
something,
somethingelse,
(
SELECT
athirdthing
FROM
thirdtable
) as thirdthing
FROM
sometable
INNER JOIN someothertable
WHERE
this = that;

Etc. Is anything like that planned for the future? Could I submit a
feature request?

Cheers
Tom

Enrico Schenk wrote:
> Hello Tom,
>
> Can you tell us which version of DTP/Eclipse and which database you are
> using?
>
> Thanks,
> Rico
>
> PS:
> If I remember right, the "Format SQL" function should change all
> registered keywords of your database dialect to upper case. To make this
> work you have to set at least the database type for the scrapbook.
Previous Topic:DTP Incubator Promotion Policy
Next Topic:JDBC Connection Error
Goto Forum:
  


Current Time: Thu Dec 18 11:30:11 GMT 2014

Powered by FUDForum. Page generated in 0.01954 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software