Quantcast
Channel: Toad for Oracle Forum - Recent Threads
Viewing all 4385 articles
Browse latest View live

RE: Running Toad version 10.1.1.8 on Windows 8 the Single Record Viewer dialog boxes are blacked out

$
0
0

I don't have Windows 8 to test this on, but if I remember this correctly, the problem was that when the dataset is read only (did not include a ROWID), some users could not see the text because the background color of the edit box was the same color.    I don't remember if that was black or some shade of gray.  So I think if you just include ROWID in your query, you'll be able to see everything.    Where is that 3D setting that you are talking about?  I didn't see it.

In Toad 11, we added a setting in Single Record View to change the background color of the edit box when it's read-only.


Running Toad version 10.1.1.8 on Windows 8 the Single Record Viewer dialog boxes are blacked out

$
0
0

on windows 7 there is a fix for this by going into the advanced appearance settings and changing the item setting to 3d Item which apparently allows you to edit the text,

does anyone have a solution for windows 8?

Thanks

RE: Query Result SQL

$
0
0

There is not a feature that was specifically made for this, but you can use the Export Dataset button to achieve what you are looking to do. You can click the icon in the Data Grid toolbar or right click and select it from the menu. Then, when the Export Wizard appears, select the Dataset tab and you will see the SQL that was run to get the results in the data grid.

If you would like to submit an enhancement to have a feature specifically for this, you can submit it in our IdeaPond section. Here is a link to Idea Pond.

www.toadworld.com/.../i

RE: Query Result SQL

$
0
0

I use the export wizard a multiple times per day and I never saw the Dataset tab!  Thank you.

I still think it will be a nice improvement to have the direct access to an "SQL"  icon so I will submit it to the Idea pond .

RE: Query Result SQL

$
0
0
The Editor has a Query Viewer panel. It shows all queries executed using F9. The most recent one will  be the SQL that generated your results. If you don’t see the QV panel you can show it via rt-click menu, see the Desktop flyout.
 

RE: Newbie Query Question

$
0
0

this might help:

WITH MyRowSet

AS(SELECT

LastName, FirstName, MYID, Status,

ROW_NUMBER ()OVER(PARTITIONBY Status ORDERBY Status DESC)AS r_num

FROM Members_Names )

SELECT *

FROM MyRowSet

WHERE r_num <=10;

RE: Editor F8 popup not showing

$
0
0

I was able to find the pop-up editor "off screen" in Windows. Activate the pop-up editor then press Alt+Space. If you see a control menu like you'd see if you clicked the icon in the top left of most Windows application windows, cursor down to "Move" and press enter, or click it with your mouse. You should then have a handle on the window and may be able to drag it onto the screen with the mouse or cursor keys. This works in many instances where windows have wandered out of view.

Editor F8 popup not showing

$
0
0

Howdy all,

When it was released, I upgraded a co-worker to 11GA.  Today, his F8 doesn't work in the Editor.  The screen flickers on the left side like it wants to show, but then disappears.  And I can't find SQL Recall on any toolbar management.  I've messed around with my Toad (11.1Beta), but can't find out how it could be hidden.

I had him close all Toad windows while maintaining a connection, then hold down the F8 key.  A vertical line flickers on the LHS as though a window is appearing/disappearing very quickly.

Thoughts?  Other than deleting his profile, that is....

TIA!
Rich -- [TeamT]

Disclaimer:  It's (finally!) beginning to look a lot like Christmas.


RE: Query Result SQL

PIV Card Authentication

$
0
0

Is anyone using PIV cards to logon to oracle database via toad? If so how?

RE: version 12.8.0.49

$
0
0

Sounds like you don't have the DB Admin module.  

Go to Help -> About.    If you have the DB Admin module, it will be listed under "Add-ons"

version 12.8.0.49

$
0
0
I am having toad version  12.8.0.49, but I cannot find option to comapre database "Go to Database | Compare | Databases"

Any idea why ?


RE: Newbie Query Question

$
0
0

Haven't tried it yet (crazy at work). It certainly looks elegant though. How does one handle the different Statuses (statusii?) :-)

Newbie Query Question

$
0
0

Greetings All!

I am Extremely new to SQL and TOAD. My new job requires some knowledge on writing queries. I have enrolled in some classes but need to jump ahead with this query. For you this is child's play! :-)

I am selecting multiple columns from a single table. One column has multiple possible statuses - "Y, A, A-I, I and I-I" I need to write a query that will return ten examples of each status from within this table.

I Believe that covers what I need. Thank You in Advance for your kind replies! As time goes on (and I know what the hell I am doing! :-) ) I look forward to contributing and helping some other newbie along!

Have a Great Day!

SQL Logic for Time Difference

$
0
0

Greetings,

I need to find out all exams that concluded over 72 hours ago but for which final grades have not been posted. The relevant data in 2 columns are Exam Date (DATE) & Exam_End_Time (VARCHAR2 (11 Char)).

I am trying to figure out two things - first, logic that will allow me to capture all exams that concluded over 72 hours ago from current time and second how to display this time in hours. Currently I am hard coding my time difference logic (trunc (B.SYEXAMS_EXAM_DATE) < trunc (To_date ('03/06/2016', 'DD/MM/YYYY'))). I would like to make this logic dynamic where my script would calculate time based on sysdate.

My display logic does not give me 100% accurate answer either. My display logic is as follows:

round(uos_f_time_diff_in_seconds (to_date(to_char(decode(B.SYEXAMS_EXAM_DATE,null,sysdate,B.SYEXAMS_EXAM_DATE),'DD-MM-YYYY')||' '||substr(B.SYEXAMS_TIME_TO, 1,

                  length(SYEXAMS_TIME_TO)-2),'DD-MM-YYYY HH:MI:SS') ,sysdate)/3600,0) HOURS_PASSED,

Any assistance provided would be appreciated.

My current script is as follows:

....................................................................................................................................

select      A.SFRSTCR_TERM_CODE                                                               TERM,

              C.SSBSECT_SUBJ_CODE||C.SSBSECT_CRSE_NUMB              CRSE_NUM,

              A.SFRSTCR_CRN                                                                                  CRN,

              C.SSBSECT_SEQ_NUMB                                                                    SEC,

              D.SCBCRSE_TITLE                                                                              COURSE_TITLE,

            C.SSBSECT_SCHD_CODE                                                                   TYPE,

            A.SFRSTCR_CAMP_CODE                                                                   CAMP,

            E.STVCOLL_DESC                                                                                  COLLEGE,

            C.SSBSECT_ENRL                                                                                  ENRL,

            count (distinct A.SFRSTCR_PIDM)                                                        NO_GRADE,

            B.SYEXAMS_EXAM_DATE                                                                     EXAM_DATE,

            B.SYEXAMS_TIME_FROM                                                                      START_TIME,

            B.SYEXAMS_TIME_TO                                                                            END_TIME,

            --trunc(sysdate) - trunc(To_Date (B.SYEXAMS_EXAM_DATE))       DAYS_PASSED,

            round(uos_f_time_diff_in_seconds (to_date(to_char(decode(B.SYEXAMS_EXAM_DATE,null,sysdate,B.SYEXAMS_EXAM_DATE),'DD-MM-YYYY')||' '||substr(B.SYEXAMS_TIME_TO, 1,

                  length(SYEXAMS_TIME_TO)-2),'DD-MM-YYYY HH:MI:SS') ,sysdate)/3600,0) HOURS_PASSED,

            UCS_PKG.GET_PIDM_ID(F.SIRASGN_PIDM)                                    INSTR_ID,

            G.SPRIDEN_FIRST_NAME||' '||G.SPRIDEN_LAST_NAME               INSTR_NAME,

            H.GOREMAL_EMAIL_ADDRESS                                                           INSTR_EMAIL_ADDRESS

 

from        SFRSTCR A, SYEXAMS B, SSBSECT C, SCBCRSE D, STVCOLL E, SIRASGN F, SPRIDEN G, GOREMAL H

 

where      A.SFRSTCR_TERM_CODE        = B.SYEXAMS_TERM_CODE

and        A.SFRSTCR_TERM_CODE          = C.SSBSECT_TERM_CODE

and        A.SFRSTCR_CRN                        = B.SYEXAMS_CRN

and        A.SFRSTCR_CRN                        = C.SSBSECT_CRN

and        trunc (B.SYEXAMS_EXAM_DATE) < trunc (To_date ('03/06/2016', 'DD/MM/YYYY'))

and        A.SFRSTCR_RSTS_CODE        in ('RE', 'RW', 'RF')

and        A.SFRSTCR_GRDE_CODE        is null

and        A.SFRSTCR_TERM_CODE        = '201520'

and        C.SSBSECT_SUBJ_CODE        = D.SCBCRSE_SUBJ_CODE

and        C.SSBSECT_CRSE_NUMB        = D.SCBCRSE_CRSE_NUMB

and        D.SCBCRSE_EFF_TERM          = (select  max(E.SCBCRSE_EFF_TERM)

                                          from    SCBCRSE E

                                          where    D.SCBCRSE_SUBJ_CODE = E.SCBCRSE_SUBJ_CODE

                                          and      D.SCBCRSE_CRSE_NUMB = E.SCBCRSE_CRSE_NUMB

                                          )                      

and        D.SCBCRSE_COLL_CODE        = E.STVCOLL_CODE(+)

and        C.SSBSECT_TERM_CODE        = F.SIRASGN_TERM_CODE

and        C.SSBSECT_CRN                     = F.SIRASGN_CRN

and        F.SIRASGN_PIDM                     = H.GOREMAL_PIDM(+)

and        H.GOREMAL_EMAL_CODE        = '20'

and        H.GOREMAL_STATUS_IND        = 'A'

and        F.SIRASGN_PIDM                      = G.SPRIDEN_PIDM

and        G.SPRIDEN_CHANGE_IND        is null

 

Group by    A.SFRSTCR_TERM_CODE, C.SSBSECT_SUBJ_CODE||C.SSBSECT_CRSE_NUMB, A.SFRSTCR_CRN, C.SSBSECT_SEQ_NUMB, D.SCBCRSE_TITLE, C.SSBSECT_SCHD_CODE, E.STVCOLL_DESC, A.SFRSTCR_CAMP_CODE, C.SSBSECT_ENRL, B.SYEXAMS_EXAM_DATE, B.SYEXAMS_TIME_FROM, B.SYEXAMS_TIME_TO, UCS_PKG.GET_PIDM_ID(F.SIRASGN_PIDM),

            G.SPRIDEN_FIRST_NAME||' '||G.SPRIDEN_LAST_NAME, H.GOREMAL_EMAIL_ADDRESS,

            round(uos_f_time_diff_in_seconds (to_date(to_char(decode(B.SYEXAMS_EXAM_DATE,NULL,sysdate,B.SYEXAMS_EXAM_DATE),'DD-MM-YYYY')||' '||substr(B.SYEXAMS_TIME_TO, 1,

                  length(B.SYEXAMS_TIME_TO)-2),'DD-MM-YYYY HH:MI:SS') ,sysdate)/3600,0)

order by    round(uos_f_time_diff_in_seconds (to_date(to_char(decode(B.SYEXAMS_EXAM_DATE,null,sysdate,B.SYEXAMS_EXAM_DATE),'DD-MM-YYYY')||' '||substr(B.SYEXAMS_TIME_TO, 1,

                  length(B.SYEXAMS_TIME_TO)-2),'DD-MM-YYYY HH:MI:SS') ,sysdate)/3600,0) desc, H.GOREMAL_EMAIL_ADDRESS

;

............................................................................................................................................

 

Function

............................................................................................................................................

CREATE OR REPLACE FUNCTION UOSINST1."UOS_F_TIME_DIFF_IN_SECONDS" (

DATE_1 IN DATE, DATE_2 IN DATE) RETURN NUMBER IS

 

NDATE_1 NUMBER;

NDATE_2 NUMBER;

NSECOND_1 NUMBER(10,5);

NSECOND_2 NUMBER(10,5);

 

-- DATE_1 => START DATE

-- DATE_2 => END DATE

 

BEGIN

 

  IF DATE_2>DATE_1

  THEN

 

  -- Get Julian date number from first date (DATE_1)

  NDATE_1 := TO_NUMBER(TO_CHAR(DATE_1, 'J'));

 

  -- Get Julian date number from second date (DATE_2)

  NDATE_2 := TO_NUMBER(TO_CHAR(DATE_2, 'J'));

 

  -- Get seconds since midnight from first date (DATE_1)

  NSECOND_1 := TO_NUMBER(TO_CHAR(DATE_1, 'SSSSS'));

 

  -- Get seconds since midnight from second date (DATE_2)

  NSECOND_2 := TO_NUMBER(TO_CHAR(DATE_2, 'SSSSS'));

 

  RETURN (((NDATE_2 - NDATE_1) * 86400)+(NSECOND_2 - NSECOND_1));

 

ELSE RETURN 0;

END IF; 

  

END uos_f_time_diff_in_seconds;

/

............................................................................................................................................


Asynchronous Trigger of a Procedure

$
0
0

Hi All,

Can anyone please let me know how to trigger multiple procedures in parallel from a master procedure. The second child procedures should not wait for the completion of the first child procedure.

I can do this by creating two scheduled job, but I don't want to do it using jobs.I tried the below code but the second child procedure always waits for the first procedure to complete and then only it starts. So please let me know if there are any other method to achieve this.

For example: There is a master procedure as MASTER_PROCEDURE and two child packages are triggered in parallel from the master procedure.

CREATE ORREPLACEPROCEDURE MASTER_PROCEDURE

BEGIN

First_ChildProc( 123);

Second_ChildProc( 123);

END;


 

Thanks in advance.

Regards

Sanjeev

RE: SQL Logic for Time Difference

$
0
0
Hi Jollydoe,

>> I will talk to the developer of the program to see if data could be cleaned.

Basically, the data has to be cleaned and there needs to be check or other constraints, triggers etc, added to ensure that whatever is being stored is in a valid time format. The ideal solution is to combine the two columns into one date type column. Oracle will validate the dates for you and pplicaton code will be less weird, having to call data cleansing functions on each select etc.

When I saw the amount of weird data all supposedly representing a time, it almost made me weep! The function I uploaded at lunchtime will clean up the current pile of poo (technical term) but who is to say what other formats the users will think up in the future?

Speaking of constraints, it's perfectly fine for the application to enforce business rules, but the database has to have the final say in the matter! You must keep the constraints, triggers etc that are enforcing the rules as close as possible to the data. They live in the database. Even if they so appear in the application.

The applicaton must be coded in such a way as to handle any database exceptions properly, allowing the user the ability to correct and resubmit their data without having to re-enter it all from the start each time!

HTH

Cheers,
Norm. [ TeamT ]
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

RE: SQL Logic for Time Difference

$
0
0

Hi Norm,

Thank you for the detailed explanation and SQL script. Please give me some time to go over it, work with the developer to fix the incorrect data type issue, and resolve my time difference logic issue. I will get back to you once I am done with these three items.

RE: Toad Session Browser

$
0
0

In a word, trace it.

Use Toads Session Browser to find the session that you know will get stuck, start tracing and then leave it to runt until stuck, then a wee bit longer, then stop the trace and see what it shows.

If you don't have the DBA Module which provides the session browser, then add the following code before and after your sticking query:

alter session set events '10046 trace name context forever, level 12';

your query here

alter session set events '10046 trace name context off';

This obviously requires your user to have ALTER SESSION privileges.

There are other ways such as calling dbms_system or dbms_monitor but the depend on certain versions of Oracle. For 11g you should/could use the following instead:

exec dbms_monitor.session_trace_enable(waits=>true, binds=>false);

Your SQL here

exec dbms_monitor.session_trace_disable;

This requires that your user has EXECUTE privilege granted on DBMS_MONITOR.

Then you just need to check out the contents of the trace file. If you have the DBA Module in Toad, then you can use the trace file browser. Otherwise, it's the "joy of hex" and you'll have to trawl through the data looking for long waits etc. Or you could use tkprof I suppose!

Good luck.

Toad Session Browser

$
0
0

Hello,


I am using Oracle Database 11g Release 11.2.0.4.0.

I have one application which is calling one Procedure Query from Back End. When this query called, my application get stuck.

And Toad Session browser is showing me that this query is running.

But when I take that query from session browser and Pass same parameter as passing from Application, Query execute in miliseconds.

Can you please suggest us what can we do in this case?

Thanks in advance.

Viewing all 4385 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>