distal-attribute
distal-attribute
distal-attribute
distal-attribute

SQL Code Formatting

User, date Message
Written by jason.fonsecaMoney, Euro
2 years ago
Category: General
7 posts since Fri, 06 Aug 10
Whenever I save mysql views I have really long select statements.

When I sql format them in heidi, it keeps each of the select section of the statements on the same line.

Can you update the SQL Formatting code to put each select item on a new line?

So for example

SELECT `p`.`pub_memid` AS `pub_memid`,`a`.`audit_inexcess` AS `audit_inexcess`,`a`.`auditid` AS `auditid`,`a`.`audit_period` AS `audit_period`,

changes to

SELECT
`p`.`pub_memid` AS `pub_memid`,
`a`.`audit_inexcess` AS `audit_inexcess`,
`a`.`auditid` AS `auditid`,
`a`.`audit_period` AS `audit_period`,

Written by ansgar
2 years ago
4793 posts since Fri, 07 Apr 06
VIEW code is preserved by HeidiSQL in newer builds, to avoid this long one-liner. I also had this ugly problem on all VIEWs, so I put some effort into HeidiSQL to preserve the original code, by loading the .frm file from the servers data directory. I guess you report about that problem as you did not yet update your HeidiSQL, so please just update to the latest build and you're done.
 

Please login to leave a reply, or register at first.