Problem Report: column selection

ScottMattes

Member³
I have a procedure with 3 input variables like so

Code:
PROCEDURE Fetch_Allowance_Reqs(v_Customer_Uic         IN VARCHAR2,
                                 v_Customer_Tsi         IN VARCHAR2,
                                 v_Customer_Supplier_Pk IN INTEGER) IS

I wanted to change the "v_" to "i_", so I used column selection to hilite just the "v" in the variable names. I then opened the Find/Replace dialog and input v in the text to find and i in the replace with fields, made sure that the Selection radio button was clicked and then i clicked on Replace All and this is what I got

Code:
PROCEDURE Fetch_Allowance_Reqs(i_Customer_Uic         IN iARCHAR2,
                                 i_Customer_Tsi         IN iARCHAR2,
                                 i_Customer_Supplier_Pk IN INTEGER) IS

notice that the "V" in "VARCHAR2" has been changed to "i". This also happened on different lines where there was "v_" and English text with "v" in it.

If I check Case Sensitive the problem doesn't happen.

UPDATE: if there is only one line, this problem doesn't happen. And, if there are multiple lines, and all lines have varchar2 varialbes, the last line will not have "VARCHAR2" changed to "iARCHAR2".
 
Last edited:
Patrick,
Yes, your column edit plugin would have solved my problem - thank you.

I have also downloaded and installed CommentLine, Editor Enhancement, Execute Current Statement, and InitCaps.

One enhancement request, in Editor Enhancements, I won't use the Remove Trailing Spaces or the Remove Blank Lines because they don't limit themselves to just the lines I have selected. I don't use tabs in my source, but I'll guess that the same would be true for Replace Tab by Spaces.
 
It looks like the replace function does not take into account the kind of selection you used - it assumes standard selection and in the result it replaces text from selection start point to selection end point not limited to selection columns. That's why when your column selection is in single line it behaves correctly (in that case the column selection is the same as standard selection) and that's why "v" in "varchar2" in last selection line is not affected (it's outside selection range).
 
Back
Top