Announcement

Collapse
No announcement yet.

Why Does Navicat Uglify my View Definition

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Why Does Navicat Uglify my View Definition

    Why does Navicat alter my nicely formatted view definition on saving - adding backticks and brackets?

    What a mess!

    select `l`.`League_id` AS `league_id`,`pr`.`member_id` AS `member_id`,`h`.`number` AS `hole_number`,`ht`.`stroke_index` AS `stroke_index`,round((`hr`.`start_handicap` * `l`.`eclectic_handicap_proportion`),0) AS `eclectic_handicap`,(case when ((round((`hr`.`start_handicap` * `l`.`eclectic_handicap_proportion`),0) - `ht`.`stroke_index`) >= 0) then 1 when ((round((`hr`.`start_handicap` * `l`.`eclectic_handicap_proportion`),0) - `ht`.`stroke_index`) >= 18) then 2 when ((round((`hr`.`start_handicap` * `l`.`eclectic_handicap_proportion`),0) - `ht`.`stroke_index`) <= -(18)) then -(1) else 0 end) AS `strokes_received`,min(`ph`.`score`) AS `low_gross` from ((((((`player_holes` `ph` join `holes` `h` on((`h`.`hole_id` = `ph`.`hole_id`))) join `hole_tees` `ht` on((`ht`.`hole_id` = `h`.`hole_id`))) join `player_rounds` `pr` on((`pr`.`player_round_id` = `ph`.`player_round_id`))) join `league_rounds` `lr` on((`lr`.`league_round_id` = `pr`.`league_round_id`))) join `leagues` `l` on((`l`.`League_id` = `lr`.`league_id`))) join `league_player_handicap_records` `hr` on(((`hr`.`league_id` = `l`.`League_id`) and (`hr`.`member_id` = `pr`.`member_id`)))) where (`ph`.`score` > 0) group by `l`.`League_id`,`pr`.`member_id`,`h`.`number`,`ht` .`stroke_index`,`eclectic_handicap`,`strokes_recei ved`

  • #2
    Views are stored in the server, and the backticks and brackets are added by the server. Please notice that Navicat retrieves the view definition from the server side and displays it in the UI, but not all servers support to return formatted definition.

    Comment

    Working...
    X