Toad World® Forums

CASE in Code Assistant

Is there any reason the CASE statement is not in the Code Assistant?

Thanks.

-Charlie

Hi Charlie,

I think we have CASE statement in Code Assistant, can you please check the place as the picture I attached?

0361.CASE.png

The statement would be like:


CASE { WHEN boolean_expression THEN {statement;} … }…

[ ELSE {statement;}… ]

END CASE [ label_name ];


and:


CASE case_operand

{ WHEN when_operand THEN {statement;} … }…

[ ELSE {statement;}… ]

END CASE [ label_name ];


Let me know if they are what you want, thx.

Thanks,

Shirly

I don't have that in mine.

Yeh I can see they are missing with the profile you provided before, we will investigate more and let you know how we go later. Thanks.

Hi Charlie,

The statement in Code Assistant can be added and deleted manually by right click items. So we suspect you may have these 2 statement deleted somehow.

Can you please try the workaround below to add them back? Right click on the IF statement -> Add Snippet.

The detail of the 2 CASE statements you missed is as below:


Name: Searched CASE …

Snippet:

CASE { WHEN boolean_expression THEN {statement;} … }…

[ ELSE {statement;}… ]

END CASE [ label_name ];


Name:Simple CASE …

Snippet:

CASE case_operand

{ WHEN when_operand THEN {statement;} … }…

[ ELSE {statement;}… ]

END CASE [ label_name ];


Let me know if it works.

Thanks,

Shirly

It worked. Well not initially. When I initially added it, the “snippet” code was not displayed in the bottom are of the Code Assistant. I had to add the same code to the Information tab of the Snippet.

So that works. I’m pretty sure I never deleted it, so I’m not sure how that happened. I’m wondering now if there are more that I am missing?

Well, now it is gone again. I guess when I installed the new beta, it erased what I added manually. I think there are 2 issues (questions):

  1. Are all manual changes deleted when SQL Nav is updated?

  2. How can we get the most current version loaded (with up-to-date syntax)?

Thanks.

-Charlie

This still is an open question (issue) for me. How can I get the up-to-date syntax in my Code Assistant?

Thanks.

-Charlie