Skip to Main Content

SQLcl: MCP Server & SQL Prompt

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Query results pane is disabled or can not access results

User_EKWC5Jan 17 2020 — edited Jan 24 2020

Hi, i have been facing this issue quite longer now.

I am using SQL developer, when i run my SQL its displays the results correctly in Query Results window, but when i want to copy something from Query Results, or want to do right click on the Query Results to do export and all, its just seems like disabled.

It does not highlight any cell on clicking on Query results pane or does not display Context Menu on Right clicking on Query Results etc. I cant even click on Column Headers to sort the results.

Clicking on anywhere else or right click anywhere else works perfectly fine. Even i can copy contents of Script output pane, but the issue is only with Query Results.

I faced this issue with SQL Developer Version 3.2.09, Build MAIN-09.30, also with V18 as well.

Is there any way i can make it enabled or is it a BUG. Not sure it got disable by mistake by me.

I have already tried installing uninstalling SQL developer version, but no luck.

Can somebody help?

This post has been answered by Glen Conway on Jan 20 2020
Jump to Answer

Comments

Holger.Lehmann

Hi,

you have to transfer either a number (1,0) or varchar2(Y, N) to boolean true or false.

But always take the same solution for the whole application, keeps things easier.

Regards

Holger

Al-Salamu Alikum We Rahmatu Allah We Barakatu,

Mohmed, what are you trying to do ?

May be you need to use Boolean in a function logic from forms or db. No  ?

If you need such a flag for such a logic (yes or no) you can use a Number or a Char Datatype.

Then, if the value column  is 1 then return Boolean function with TRUE & vise versa.

If it is 0 You can return False.

need to change the db item types.

Amatu Allah.

Mohamed Ali Soltani

Hi @"Holger.Lehmann",

W Alikum Al-Salamu We Rahmatu Allah We Barakatu @"Amatu Allah Neveen Ebrahim",

Thank you for your answer.

My main question is : Does any of both can make a bug later ? Does both have same effect on performance ?

Holger.Lehmann

Hi Mohamed,

regarding performance this should have no impact.

In most cases I've seen usage of a varchar2(1) flag.

And in my current project there is a PL/SQL function, that converts Boolean values to a varchar2(1) flag.

  FUNCTION myBool_To_Flag_Function (PBoolean IN boolean) RETURN varchar2 IS

Mohamed Ali Soltani

Hi Holger,

I haven't thought about it. It's really a good idea.

Thank you !

Amatu Allah Neveen Ebrahim
Answer

   You don't have to think about any database field as a Boolean value.

Just create a db field as Number, Char or Varchar2 datatype.

Number data type is a db type which i prefer it's faster than other data types.

I recommend using a pl/sql function with a Boolean return value using if statement to switch between two values either 0 or 1.

-------------------------------------------------------------

EXAMPLE:

========

FUNCTION TEST RETURN BOOLEAN IS

v_flage  NUMBER;

BEGIN

     BEGIN

      SELECT your_db_flg

      INTO  v_flage 

      FROM  your_table

     WHERE -- condition--- ;

  EXCEPTION

        WHEN NO_DATA_FOUND THEN RETURN 0;

  END;

IF v_flage   = 1 THEN

    

           RETURN TRUE;

ELSIF v_flage  = 0 THEN

    

         RETURN FALSE;

END IF;

END;

Amatu Allah.

Marked as Answer by Mohamed Ali Soltani · Sep 27 2020
Mohamed Ali Soltani

Thank you

You are welcome.

Andreas Weiden

Would you mind prooving this statement?

- Number data type is a db type which i prefer it's faster than other data types.

I don't think that there is any remarkable performance-difference with using a a NUMBER storing 0 and and a VARCHAR storing Y or N

A datatype decision should always be made to best fit its purpose.

Hello Andreas,

I agree.

Thanks for your comments.

1 - 10

Post Details

Added on Jan 17 2020
9 comments
4,702 views