Options

Multiple constraints, the format becomes messy

zhiyounetzhiyounet Posts: 10 New member
Formatted before:

alter table gldz
add constraint ck_gldz_1 check (gxflbm like '0[1-8]'),
constraint ck_gldz_2 check(fwlbm like '01%'),
constraint ck_gldz_3 check(wlbm like '01%'),
constraint ck_gldz_4 check(left(fwlbm,4)=left(wlbm,4)),
constraint fk_gldz_5 foreign key (gxflbm) references gxfl(gxflbm),
constraint fk_gldz_Inventory_6 foreign key (fwlbm) references Inventory(cInvCode),
constraint fk_gldz_Inventory_7 foreign key (wlbm) references Inventory(cInvCode);

Hope for a number of constraints, the conditions can not format, this is actually better.
Tagged:

Comments

  • Options
    Jessica RJessica R Posts: 1,319 Rose Gold 4
    Hi @zhiyounet, thanks for your post!

    Just to make sure I'm understanding correctly, do you mean that you would like each constraint to remain on a separate line as it does in the "Formatted before"?

    Please let me know if I'm misunderstanding!

    Jessica Ramos | Product Support Engineer | Redgate Software

    Have you visited our Help Center?


  • Options
    Jessica RJessica R Posts: 1,319 Rose Gold 4
    Just a quick update that we have logged a bug for this issue of SQL Prompt not putting multiple constraints on new lines. It is logged as SP-6452 and I will post here once we have a fix.

    If I have misunderstood the original issue you reported, however, please let me know!

    Jessica Ramos | Product Support Engineer | Redgate Software

    Have you visited our Help Center?


  • Options
    zhiyounetzhiyounet Posts: 10 New member
    Yes,I like each constraint to remain on a separate line as it does in the "Formatted before"
  • Options
    Jessica RJessica R Posts: 1,319 Rose Gold 4
    Thanks for confirming that @zhiyounet!

    I'll let you know once I have an update on the issue.

    Jessica Ramos | Product Support Engineer | Redgate Software

    Have you visited our Help Center?


  • Options
    Jessica RJessica R Posts: 1,319 Rose Gold 4
    Hi @zhiyounet!

    I'm happy to report that this issue is resolved in the latest version of SQL Prompt, v8.0.8.2086. You can update to this from SQL Prompt>Help>Check for updates.

    I hope this helps but please let me know if there are any further issues for you!

    Jessica Ramos | Product Support Engineer | Redgate Software

    Have you visited our Help Center?


Sign In or Register to comment.