How can we help you today? How can we help you today?

Logical operator on single line

SQL Refactor: great stuff :D

One thing that we miss is the option 'logical operator on single line'

We use to format sql this way:
select 
  col1,
  col2
from 
  tbl
where
  expr1
  and
  expr2
I know that v1 is feature frozen, but probably there are some
more people out there that want the same enhancement...

Another thing is: after SET in StoredProcs there should never be a new line.

Thanks,

Roland
romu_ecosys
0

Comments

3 comments

  • Andras B
    romu_ecosys wrote:
    SQL Refactor: great stuff :D

    One thing that we miss is the option 'logical operator on single line'

    We use to format sql this way:
    select 
      col1,
      col2
    from 
      tbl
    where
      expr1
      and
      expr2
    
    I know that v1 is feature frozen, but probably there are some
    more people out there that want the same enhancement...

    Another thing is: after SET in StoredProcs there should never be a new line.

    Thanks,

    Roland

    Hi Roland,


    concerning operators on new line we have not seen this style before, but we will consider it in the future.

    About the SET and new lines, could you give an example?

    Regards,
    Andras
    Andras B
    0
  • romu_ecosys
    Original:
    IF @IsHoliday=1
    	SET @DayState = 3
    ELSE
    	SET @DayState = 1
    

    After Reformat:
    IF @IsHoliday = 1 
        SET
          @DayState = 3
      ELSE 
        SET
          @DayState = 1
    

    Our proposal would be that for standalone set statements there never should be a newline (although we have opted for 'First Column On New Line'.
    Not a big thing, but I guess others might want that as well...

    Roland
    romu_ecosys
    0
  • Andras B
    romu_ecosys wrote:
    ...
    Our proposal would be that for standalone set statements there never should be a newline (although we have opted for 'First Column On New Line'.
    Not a big thing, but I guess others might want that as well...

    Roland

    Hi Roland,

    this is now fixed, and will be working as expected in the released product. Many thanks for reporting this problem.

    Regards,
    Andras
    Andras B
    0

Add comment

Please sign in to leave a comment.