Start a new topic

Copy Editor Formatted to Clipboard

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

Can you please add a new Format to the Target SQL Format drowpdown: VB string (5) It would copy sql AS IS into the clipboard. Current VB String (1) lumps some lines together on one line (See example) so if the sql is +select+ + a+ +,b+ +,c+ +,d = f+ +,ce.ClassDescr+ +,InvestorType = lower(isnull(g,'Retail/Other'))+ +from table1+ + inner join table1 ft (index idx0) on ft.BookID = tm.BookID+ + inner join table2 um (index idx2) on um.UntCode = tm.SourceID+ + inner join table3 ce (index idx0) on ce.UntCode = um.UntCode+ + and ce.ClassID = tm.ClassID+ the formatted sql (VB String1) would be: +SQL = ""+ +SQL = SQL & " SELECT a , b , c , d = f , ce.ClassDescr , InvestorType = lower(isnull(g , 'Retail/Other')) "+ +SQL = SQL & " FROM table1 "+ +SQL = SQL & "INNER JOIN table1 ft (INDEX idx0) "+ +SQL = SQL & " ON ft.BookID = tm.BookID "+ +SQL = SQL & "INNER JOIN table2 um (INDEX idx2) "+ +SQL = SQL & " ON um.UntCode = tm.SourceID "+ +SQL = SQL & "INNER JOIN table3 ce (INDEX idx0) "+ +SQL = SQL & " ON ce.UntCode = um.UntCode "+ +SQL = SQL & " AND ce.ClassID = tm.ClassID"+ Also, would it be possible to add an option to the new Format to include some custom (free form) characters/text. For example, I'd like to copy formatted SQL and inlcude vbCrLf in each line, so the copied output is like sql = sql & vbCrLf & "........" What do you think ?

[This reply is migrated from our old forums.]

Re: Copy Editor Formatted to Clipboard
Hi Alex, We have this on our todo list. I've added your vote for it. Best Regards, Hans
[This reply is migrated from our old forums. The original author name has been removed]

Re: Copy Editor Formatted to Clipboard
Hi Team! Great new features in 8.0 .. Was a bit disappointed that this feature did not make it in... ;( Also, the Copy formatted for some reason does not operate on a selected text, it operates on a whole script...
[This reply is migrated from our old forums.]

Re: Copy Editor Formatted to Clipboard
Hi Alex, We will fix "Copy Formatted" as it should operate on selection rather than the whole buffer. Regards Roger
[This reply is migrated from our old forums. The original author name has been removed]

Re: Copy Editor Formatted to Clipboard
Roger, The changes from the original post (Mar 21, 2011 10:21 AM ) will also be implemented?
[This reply is migrated from our old forums.]

Re: Copy Editor Formatted to Clipboard
Alex, No, it is still in the queue. Regards Roger
[This reply is migrated from our old forums.]

Re: Copy Editor Formatted to Clipboard
Hi Alex, Until an "unformatted" option is added, you may get most (if not all) of the formatting you want by adjusting the SQL Formatting settings in Tool Properties. For instance, in the Line Breaks category you can enable the line break Before Comma, and disable it for JOIN Statements. Currently, the statement is formatted according to these settings before it is wrapped in the programming language statements, so if you get the line breaks etc. the way you want them for a regular formatting, they will also be applied to the formatting done for Copy Formatted. Best Regards, Hans
[This reply is migrated from our old forums.]

Re: Copy Editor Formatted to Clipboard
Alex, "Copy Formatted" is now fixed to operate on selection in the just released 8.0.1 version. Regards Roger