Start a new topic

Comments after SQL statement will be deleted while formatting the buffer

[This topic is migrated from our old forums. The original author name has been removed]

Hi @ all, If you've got following SQL in your DbVis (6.5.8): Original SQL: '-- this is a test select * from dual; '-- this line will be deleted after "Format Buffer" Ctrl+Shift+F '-- and this one as well and press Ctrl+Shift+F for formatting the buffer, all comments after the last SQL statement wille be deleted. Result after formatting: '-- this is a test select * from dual; Is it a bug or a feature? Thanks Markus Edited by: lulu on 08.09.2009 16:03

[This reply is migrated from our old forums.]

Re: Comments after SQL statement will be deleted while formatting the buffe
Hi Lulu, It's not intended, so I say it's a bug. Thanks for reporting it. It will be fixed in the next maintenance release. Best Regards, Hans
[This reply is migrated from our old forums. The original author name has been removed]

Re: Comments after SQL statement will be deleted while formatting the buffer
Hi Hans, Thanks for your answer. If you correct the "bug" there is another thing which should be corrected as well: if you format your SQL comments e.g. with tabs (for better reading) and you press "Format SQL -> Format Buffer" all tabs will be removed (exchanged by one space) in the comment, which should be corrected as well. e.g. (original comment - sorry, the tabs will be removed in this message) '-- This is a test for removed tabs '-- Column A[tab][tab]Column B[tab]Column C '-- test-1[tab][tab]9,56[tab]12,66 '-- anothertest-2[tab]12,23[tab]2,66 after formatting '-- This is a test for removed tabs '-- Column A Column B Column C '-- test-1 9,56 12,66 '-- anothertest-2 12,23 2,66 Hope that helps Markus Edited by: lulu on 10.09.2009 14:28
[This reply is migrated from our old forums.]

Re: Comments after SQL statement will be deleted while formatting the buffe
Hi Lulu, I agree that it can be frustrating to get tabs converted into one space. Unfortunately, this is not so easy for us to change since we rely on a third party product for the formatting. Instead I suggest that you enable Expand Tab to Whitespace in Tool Properties, in the SQL Editor category. Best Regards, Hans