Counting records after a query
I am running a query and I want to display the number of records retrieved during the query. I have researched the COUNT_QUERY built-in and tried to assign the value returned by this built-in to a variable. (It doesn't work.) I have used the the following statement within the WHEN-BUTTON-PRESSED trigger for a Push Button on my form:
SELECT COUNT(:BLOCK.ITEM)
INTO :BLOCK.ITEM2
FROM DUAL;
This statement is not providing a valid number for the number of records returned.
Is there a function that I can use to count the number of records returned from a query?
Create a display item to hold the count value. Then open the data block properties and under advanced database set precompute summaries to "yes". Then in your display item properties set the summary function to count; the summarized block to the block_name; and summarized item to any block item you would like to count.
Hope this is clear and what you are looking for.
Cheers.
Similar Messages
-
Moving to current record after execute query
Hi all,
I have a form where i can list all db jobs which can be start or stop.
for more details, form is having columns like jobs, current db status, action(start/stop drop down)
The user will view list of jobs in the screen and he straightly goes to a record and start (submit) the job using drop down for that record.
once they start/stop the job, execute query will fire to show the current status of the job.
Now going to my requirement,after execute query, I want to go to the record (job) which user has started the job .
Currently the cursor will go to first record.
Is there any oracle 10g AS property where i can get current record , put it in parameter and go to that record after execute query?
Is there any other way?
Regards,
LeonardHello,
If you are sure the record after query will keep the same position, you can before, store the current record in a number variable with Get_Block_Property( CURRENT_RECORD) built-in, then after query use the Go_Record() with stored number variable in parameter.
If you think that after re-query the record number can change, you have to loop through your records, then stop navidation while you find the corresponding key.
Francois -
Hello all,
I have a question about the counting of records in a query.
Below, there is the source data.
material plant date stock quantity
X 1 05.2006 10
X 1 06.2006 0
X 2 05.2006 15
X 2 04.2006 20
Y 1 05.2006 5
And with "How to Count the occurrences ..." guide , i created the following query.
material quantity number of plants with stock
X 45 2
Y 5 1
My question is in the second step , is it possible in the same query to get the following result for a given date ?
If this is not the case, how can I resolve this ?
material quantity nb of plants with stck nb of plants with stck >= 15
X 45 2 1 (10 for 1 and 35 for 2)
Y 5 1 0
Thanks&Regards
BurakCreate a display item to hold the count value. Then open the data block properties and under advanced database set precompute summaries to "yes". Then in your display item properties set the summary function to count; the summarized block to the block_name; and summarized item to any block item you would like to count.
Hope this is clear and what you are looking for.
Cheers. -
A good solution to set the actual data record after execute query ..
Hi,
in my Form there is a block on a temporary table.
The user can add query results and wishes to save the last data focus on the last actual record before the execute query to restore this focus after the query.
Is there a robust and fast solution to save the
actual data focus - execute_query - restore the saved focus ?
Thanks
FriedholdHere is a simple solution to try:
Create a package specification in your form: Package P0 is
Save_rowid varchar2(30);
Found_rec number;
End;Create a Key-Entqry trigger on your block: P0.save_rowid := :Myblock.rowid;
P0.Found_rec := null;
Enter_Query;Create a Post-Query trigger on the block: If :Myblock.rowid = P0.save_rowid then
P0.found_rec := :system.trigger_record;
End if;Create a Key-Exeqry trigger on the block: Execute_Query;
If P0.found_rec is not null then
Go_record(P0.found_rec;
End if; -
Counting Record Totals Within Query: Totals Output to New Table
Hi All,
I'm failry new to PL/SQL... my apologies if this is obvious... I'm trying to count the total number of BI_WRKFLW.BI_LMN_SRV_AREA occurences by each BI_WRKFLW.BI_LMN_SRV_AREA (The Code correspondes to a city name like Sundance, Sheridan, Etc.)
So, I have a Query that executes fine:
Query
/* Begin Querey */
SELECT DISTINCT
"BI_SO_DET_VIEW_1"."BI_SO_STAT_CD",
"BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED",
"BI_TYPE_SERVICE"."BI_ACCT",
"BI_SO_DET_VIEW_1"."BI_SO_NBR",
"BI_LMN_SRV_REF"."BI_LMN_SRV_DESC",
"BI_SO_TYPE_REF"."BI_SO_TYPE_DESC",
"BI_SRV_STAT_REF"."BI_SRV_STAT_DESC",
"BI_DIST_OFC_REF"."BI_DIST_NAME",
"BI_CNTY_REF"."BI_COUNTY_DESC",
"BI_SO_DET_VIEW_1"."BI_CLOSE_DT",
"BI_WRKFLW_TASKS"."BI_EVENT_DT_TM",
"BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD",
"BI_LMN_SRV_REF"."BI_LMN_SRV_AREA",
"BI_SO_MASTER"."BI_WO_WORKORD"
FROM
((((((((("XXXXXX"."BI_SO_MASTER" "BI_SO_MASTER"
LEFT OUTER JOIN
"XXXXXX"."BI_SO_DET_VIEW_1" "BI_SO_DET_VIEW_1"
ON
"BI_SO_MASTER"."BI_SO_NBR"="BI_SO_DET_VIEW_1"."BI_SO_NBR")
LEFT OUTER JOIN
"XXXXXX"."BI_TYPE_SERVICE" "BI_TYPE_SERVICE"
ON
"BI_SO_DET_VIEW_1"."ACCT_NBR"="BI_TYPE_SERVICE"."BI_ACCT")
LEFT OUTER JOIN
"XXXXXX"."BI_WRKFLW" "BI_WRKFLW"
ON
"BI_SO_DET_VIEW_1"."BI_WRKFLW_KEY"="BI_WRKFLW"."BI_WRKFLW_KEY")
LEFT OUTER JOIN
"XXXXXX"."BI_SO_TYPE_REF" "BI_SO_TYPE_REF"
ON
"BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"="BI_SO_TYPE_REF"."BI_SO_TYPE_CD")
LEFT OUTER JOIN
"XXXXXX"."BI_WRKFLW_TASKS" "BI_WRKFLW_TASKS"
ON
"BI_WRKFLW"."BI_WRKFLW_KEY"="BI_WRKFLW_TASKS"."BI_WRKFLW_KEY")
AND (
"BI_WRKFLW"."BI_WORK_EVENT_CD"="BI_WRKFLW_TASKS"."BI_WORK_EVENT_CD"))
LEFT OUTER JOIN
"XXXXXX"."BI_DIST_OFC_REF" "BI_DIST_OFC_REF"
ON
"BI_WRKFLW"."BI_DIST_OFC_CD"="BI_DIST_OFC_REF"."BI_DIST_OFC_CD")
LEFT OUTER JOIN
"XXXXXX"."BI_LMN_SRV_REF" "BI_LMN_SRV_REF"
ON
"BI_WRKFLW"."BI_LMN_SRV_AREA"="BI_LMN_SRV_REF"."BI_LMN_SRV_AREA")
LEFT OUTER JOIN
"XXXXXX"."BI_SRV_LOC" "BI_SRV_LOC"
ON
"BI_TYPE_SERVICE"."BI_SRV_LOC_NBR"="BI_SRV_LOC"."BI_SRV_LOC_NBR")
LEFT OUTER JOIN
"XXXXXX"."BI_SRV_STAT_REF" "BI_SRV_STAT_REF"
ON
"BI_TYPE_SERVICE"."BI_SRV_STAT_CD"="BI_SRV_STAT_REF"."BI_SRV_STAT_CD")
LEFT OUTER JOIN
"XXXXXX"."BI_CNTY_REF" "BI_CNTY_REF"
ON
"BI_SRV_LOC"."BI_CNTY_CD"="BI_CNTY_REF"."BI_CNTY_CD"
WHERE
"BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='001'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='001NS'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='010'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='010NS'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='011'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='011NS'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='020'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='020NS'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='030'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='040'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='041'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='050'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='050A'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='051'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='051A'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='080'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='085'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='085NS'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='108'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='140'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='141'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='400'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='401'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='450'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='450A'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='451'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='451A'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='452'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='452A'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='453'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='453A'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='460'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='RHR'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='RHRNS')
AND "BI_SO_DET_VIEW_1"."BI_SO_STAT_CD"='O'
AND (
"BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='ANNEXATION'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='AVIAN'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='CAPVERIF'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='CBMRETIRE'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='CBMSERVCHG'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='CONTSERVD'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='CUSTBLD'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='CUTOFF'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='DVCM'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='ENERGIZE'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='EQUIPCHANG'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='EQUIPVALID'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='HIGHLOAD'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='LOCATE'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='MAINT-EQ'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='MSYSTEMMGT'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='NCBM'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='NEWRES-WF'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='NEW-WF'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='POWER QUAL'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='RECONIDLE'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='RECVERIF'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='RETIRE1'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='RETIRE2'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='SERVCHANGE'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='SPECIALPRJ'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='SUBD'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='SYSTEMMGT'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='TREE'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='TRFX')
ORDER BY
"BI_LMN_SRV_REF"."BI_LMN_SRV_DESC" DESC,
"BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"
/* End Querey */That is wrapped within a counting Block that is giving me trouble:
SELECT
WOCOUNT.Office,
WOCOUNT.WOCOUNT
FROM
SELECT
CASE
WHEN "BI_WRKFLW"."BI_LMN_SRV_AREA" = '1'
THEN '1-SUNDANCE'
WHEN "BI_WRKFLW"."BI_LMN_SRV_AREA" = '2'
THEN '2-GILLETTE'
WHEN "BI_WRKFLW"."BI_LMN_SRV_AREA" = '3'
THEN '3-SHERIDAN'
WHEN "BI_WRKFLW"."BI_LMN_SRV_AREA" = '4'
THEN '4-West/Central'
WHEN "BI_WRKFLW"."BI_LMN_SRV_AREA" = '5'
THEN '5-East/Central'
ELSE '0-OTHER'
END AS Office,
COUNT (T1.BI_LMN_SRV_AREA ) AS WOCOUNT
FROM
/* Begin Querey */
/* End Querey */
) T2
JOIN
BI_SO_DET_VIEW_1
ON
T2.BI_WRKFLW_KEY = BI_SO_DET_VIEW_1.BI_WRKFLW_KEY
GROUP BY
BI_WRKFLW.BI_LMN_SRV_AREA
)WOCOUNTThis is the 2 blocks together:
SELECT
WOCOUNT.Office,
WOCOUNT.WOCOUNT
FROM
SELECT
CASE
WHEN "BI_WRKFLW"."BI_LMN_SRV_AREA" = '1'
THEN '1-SUNDANCE'
WHEN "BI_WRKFLW"."BI_LMN_SRV_AREA" = '2'
THEN '2-GILLETTE'
WHEN "BI_WRKFLW"."BI_LMN_SRV_AREA" = '3'
THEN '3-SHERIDAN'
WHEN "BI_WRKFLW"."BI_LMN_SRV_AREA" = '4'
THEN '4-West/Central'
WHEN "BI_WRKFLW"."BI_LMN_SRV_AREA" = '5'
THEN '5-East/Central'
ELSE '0-OTHER'
END AS Office,
COUNT (T1.BI_LMN_SRV_AREA ) AS WOCOUNT
FROM
/* Begin Querey */
SELECT DISTINCT
"BI_SO_DET_VIEW_1"."BI_SO_STAT_CD",
"BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED",
"BI_TYPE_SERVICE"."BI_ACCT",
"BI_SO_DET_VIEW_1"."BI_SO_NBR",
"BI_LMN_SRV_REF"."BI_LMN_SRV_DESC",
"BI_SO_TYPE_REF"."BI_SO_TYPE_DESC",
"BI_SRV_STAT_REF"."BI_SRV_STAT_DESC",
"BI_DIST_OFC_REF"."BI_DIST_NAME",
"BI_CNTY_REF"."BI_COUNTY_DESC",
"BI_SO_DET_VIEW_1"."BI_CLOSE_DT",
"BI_WRKFLW_TASKS"."BI_EVENT_DT_TM",
"BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD",
"BI_LMN_SRV_REF"."BI_LMN_SRV_AREA",
"BI_SO_MASTER"."BI_WO_WORKORD"
FROM
((((((((("XXXXXX"."BI_SO_MASTER" "BI_SO_MASTER"
LEFT OUTER JOIN
"XXXXXX"."BI_SO_DET_VIEW_1" "BI_SO_DET_VIEW_1"
ON
"BI_SO_MASTER"."BI_SO_NBR"="BI_SO_DET_VIEW_1"."BI_SO_NBR")
LEFT OUTER JOIN
"XXXXXX"."BI_TYPE_SERVICE" "BI_TYPE_SERVICE"
ON
"BI_SO_DET_VIEW_1"."ACCT_NBR"="BI_TYPE_SERVICE"."BI_ACCT")
LEFT OUTER JOIN
"XXXXXX"."BI_WRKFLW" "BI_WRKFLW"
ON
"BI_SO_DET_VIEW_1"."BI_WRKFLW_KEY"="BI_WRKFLW"."BI_WRKFLW_KEY")
LEFT OUTER JOIN
"XXXXXX"."BI_SO_TYPE_REF" "BI_SO_TYPE_REF"
ON
"BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"="BI_SO_TYPE_REF"."BI_SO_TYPE_CD")
LEFT OUTER JOIN
"XXXXXX"."BI_WRKFLW_TASKS" "BI_WRKFLW_TASKS"
ON
"BI_WRKFLW"."BI_WRKFLW_KEY"="BI_WRKFLW_TASKS"."BI_WRKFLW_KEY")
AND (
"BI_WRKFLW"."BI_WORK_EVENT_CD"="BI_WRKFLW_TASKS"."BI_WORK_EVENT_CD"))
LEFT OUTER JOIN
"XXXXXX"."BI_DIST_OFC_REF" "BI_DIST_OFC_REF"
ON
"BI_WRKFLW"."BI_DIST_OFC_CD"="BI_DIST_OFC_REF"."BI_DIST_OFC_CD")
LEFT OUTER JOIN
"XXXXXX"."BI_LMN_SRV_REF" "BI_LMN_SRV_REF"
ON
"BI_WRKFLW"."BI_LMN_SRV_AREA"="BI_LMN_SRV_REF"."BI_LMN_SRV_AREA")
LEFT OUTER JOIN
"XXXXXX"."BI_SRV_LOC" "BI_SRV_LOC"
ON
"BI_TYPE_SERVICE"."BI_SRV_LOC_NBR"="BI_SRV_LOC"."BI_SRV_LOC_NBR")
LEFT OUTER JOIN
"XXXXXX"."BI_SRV_STAT_REF" "BI_SRV_STAT_REF"
ON
"BI_TYPE_SERVICE"."BI_SRV_STAT_CD"="BI_SRV_STAT_REF"."BI_SRV_STAT_CD")
LEFT OUTER JOIN
"XXXXXX"."BI_CNTY_REF" "BI_CNTY_REF"
ON
"BI_SRV_LOC"."BI_CNTY_CD"="BI_CNTY_REF"."BI_CNTY_CD"
WHERE
"BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='001'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='001NS'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='010'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='010NS'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='011'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='011NS'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='020'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='020NS'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='030'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='040'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='041'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='050'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='050A'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='051'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='051A'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='080'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='085'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='085NS'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='108'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='140'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='141'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='400'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='401'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='450'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='450A'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='451'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='451A'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='452'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='452A'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='453'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='453A'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='460'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='RHR'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='RHRNS')
AND "BI_SO_DET_VIEW_1"."BI_SO_STAT_CD"='O'
AND (
"BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='ANNEXATION'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='AVIAN'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='CAPVERIF'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='CBMRETIRE'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='CBMSERVCHG'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='CONTSERVD'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='CUSTBLD'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='CUTOFF'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='DVCM'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='ENERGIZE'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='EQUIPCHANG'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='EQUIPVALID'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='HIGHLOAD'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='LOCATE'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='MAINT-EQ'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='MSYSTEMMGT'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='NCBM'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='NEWRES-WF'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='NEW-WF'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='POWER QUAL'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='RECONIDLE'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='RECVERIF'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='RETIRE1'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='RETIRE2'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='SERVCHANGE'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='SPECIALPRJ'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='SUBD'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='SYSTEMMGT'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='TREE'
OR "BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"='TRFX')
ORDER BY
"BI_LMN_SRV_REF"."BI_LMN_SRV_DESC" DESC,
"BI_SO_DET_VIEW_1"."BI_SO_TYPE_CD"
/* End Querey */
) T2
JOIN
BI_SO_DET_VIEW_1
ON
T2.BI_WRKFLW_KEY = BI_SO_DET_VIEW_1.BI_WRKFLW_KEY
GROUP BY
BI_WRKFLW.BI_LMN_SRV_AREA
)WOCOUNTThe last error I received is: [Error Code: 904, SQL State: S0022] [Oracle][ODBC][Ora]ORA-00904: "T2"."BI_WRKFLW_KEY": invalid identifier
I want the final Output to be something similar to:
OFFICE WOCOUNT
0-OTHER 44.0
1-SUNDANCE 14.0
2-GILLETTE 29.0
3-SHERIDAN 11.0
4-West/Central 37.0
5-East/Central 58.0 Thanks for your help,
:) JohnHi, John,
Johnbr (Oracle11G) wrote:
Hi All,
I'm failry new to PL/SQL... That's okay; there's no PL/SQL involved in this problem, and there's no PL/SQL needed, only SQL.
That is wrapped within a counting Block that is giving me trouble:
SELECT
WOCOUNT.Office,
WOCOUNT.WOCOUNT
FROM
SELECT
CASE
WHEN "BI_WRKFLW"."BI_LMN_SRV_AREA" = '1'
THEN '1-SUNDANCE'
WHEN "BI_WRKFLW"."BI_LMN_SRV_AREA" = '2'
THEN '2-GILLETTE'
WHEN "BI_WRKFLW"."BI_LMN_SRV_AREA" = '3'
THEN '3-SHERIDAN'
WHEN "BI_WRKFLW"."BI_LMN_SRV_AREA" = '4'
THEN '4-West/Central'
WHEN "BI_WRKFLW"."BI_LMN_SRV_AREA" = '5'
THEN '5-East/Central'
ELSE '0-OTHER'
END AS Office,
COUNT (T1.BI_LMN_SRV_AREA ) AS WOCOUNT
FROM
/* Begin Querey */
/* End Querey */
) T2
JOIN
BI_SO_DET_VIEW_1
ON
T2.BI_WRKFLW_KEY = BI_SO_DET_VIEW_1.BI_WRKFLW_KEY
GROUP BY
BI_WRKFLW.BI_LMN_SRV_AREA
)WOCOUNT
The sub-query called wocount only involves 2 "tables", namely
(1) T2
(2) BI_SO_DET_VIEW_1
(I put "tables" in quotes because T2 isn't really a table; it's an in-line view. Judging by the name, I'm guessing BI_SO_DET_VIEW_1 isn't really a table, either, but it doesn't matter. You have 2 things that serve as tables, so I'll just call them tables.)
Since those are the only 2 tables, you can't reference BI_WRKFLW in WOCOUNT. That table is known inside T2, but not outside of T2.
You can include "BI_WRKFLW"."BI_LMN_SRV_AREA" in the SELECT clause of T2, assuming that doesn't make more rows distinct. T2 will then look like this:
... SELECT DISTINCT
BI_SO_DET_VIEW_1.BI_SO_STAT_CD
BI_SO_MASTER.BI_WO_WORKORD,
BI_WRKFLW.BI_LMN_SRV_AREA -- New column added
FROM ...Then, inside WOCOUNT, you can use BI_LMN_SRV_AREA like this:
... CASE
WHEN BI_LMN_SRV_AREA = '1'
THEN '1-SUNDANCE'
WHEN BI_LMN_SRV_AREA = '2'
THEN '2-GILLETTE'
WHEN BI_LMN_SRV_AREA = '3'
THEN '3-SHERIDAN'
WHEN BI_LMN_SRV_AREA = '4'
THEN '4-West/Central'
WHEN BI_LMN_SRV_AREA = '5'
THEN '5-East/Central'
ELSE '0-OTHER'
END AS Office,or, to save a little typing:
... CASE BI_LMN_SRV_AREA
WHEN '1'
THEN '1-SUNDANCE'
WHEN '2'
THEN '2-GILLETTE'
WHEN '3'
THEN '3-SHERIDAN'
WHEN '4'
THEN '4-West/Central'
WHEN '5'
THEN '5-East/Central'
ELSE '0-OTHER'
END AS Office,
Speaking of saving on typing:
Instead of
WHERE
"BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='001'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='001NS'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='010'
OR "BI_TYPE_SERVICE"."BI_PRIM_RATE_SCHED"='RHRNS'
)you can use the IN operator, like this:
WHERE BI_TYPE_SERVICE.BI_PRIM_RATE_SCHED IN ('001', '001NS', '010', ..., 'RHRNS')
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
Simplify the problem as much as possible. For example, you would probably have the same problem if there were only 2 o4 3 tables involved in your query. Try to construct a problem that only has 2 or 3 tables, and post only those tables, and the results you want from them.
Explain, using specific examples, how you get those results from that data.
Always say which version of Oracle you're using. -
Return amount of records after query multi-record block
Hello,
I would like to have a restriction in my multi-record form that counts the amount of returning records (after execute_query). If the amount is >= 1000 then I have to raise an error.
How can I implement this?
Best regards,
Ronny.It most cases forms doesn't return all rows to the user in a batch unless the block property Query-all is set to yes. But if you have sum items based on that block, you have to set it to Yes. If you can turn this flag off and change the Query Array Size (block property) to 0 or something small (like 20), you dont have to worry about how many rows the query is going to return.
In you case, sounds like you want the user to put more constraints if rows returning > 1000 and you probably dont want the user to ever look those rows. You can do a
select count(*) from your_table
where --your critera
and rownum < 1001
before execute the query. But this select might take
a while if you table is very big in oracle 9i.
The easiest thing is to turn off the Query-All switch, let the forms handle the query and let the user decide whether to refine the query. -
Need Count of Displayed records after suprresion
Hi All,
My question is looks very simple but it made me very tough to get it. pls help me if you have any clue.
I have a report having 20 detail records from Database.
I used some condition at Section expert to suppress some data, after that I have only 10 records as report out put.
Now, at the report footer I need the count of the records.So, when I use count function its showing 20 instead of 10.
How to get the count of available records after suppressing.
Thank you,
Krishna PingaliHi Krishna!
I would try using a conditional Running Total formula to add each record that does not fit the suppression criteria, and then a display formula to display the final total.
Ex -
@Non-Suppressed Count Calc
WhilePrintingRecords;
NumberVar NSC;
If <> <suppression criteria> Then NSC := NSC + 1
Else NSC := NSC
@Non-Suppressed Count Display
WhilePrintingRecords;
NumberVar NSC;
NSC
Place the first formula in your Details Section and the Second in the appropriate Footer Section.
Hope that helps! -
How to count values in a query ?
Hi experts,
We have a query, which is having only characteristics. There are no key figures.
There is date field. In this date field the value may be or may not be there.
My requirement is if the date field has value then it should be counted record wise and the total count
should be displayed in the bottom of the query output. If value is not there then that record should not be
counted.
How can we do this ?
Regards,
Nishuv.Dear Nishuv,
You can create a calculated keyfigure for getting count, in that create a formula variable on characterstic with replacement as processing type.
and please clarify on what level you wanted to count, like Sales Docuement level or Item level.
For Example :
If you wanted to find no.of sales orders which are returned so you have to count on document level. this would be the replacement characterstic.
Please find the below PDf you will understand better
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/009819ab-c96e-2910-bbb2-c85f7bdec04a
Thanks
Sreekanth -
Counting records in Visual Composer
Hi folks,
I do have question I cannot find a solution ( maybe due to christmas turkey paralysis )
I am using VC to call a RFC function in ERP system 'RFC_READ_TABLE' to access data from table.
The table I access is a customer table containing Delta- Data
Actually the system RFC function returns all records ( normally between 1 and 10 records).
On VC side I'd like to display only the number of records to inform if new data is available.
How can I count records internally in VC?
( I do not like to bring in data directly into BI because the application I write will merge BI Query data with non BI data)
I'D like to use standard RFC function to receive data, but first hand I'd like to decide by number of entries whether to use data or not.
Any help is appreciated
TIAHi Prachi,
that's it.
I never used that functionality for plain counting records being returned by tables
It woks perfect.
The glory shiny points are yours.
Joerg -
How to count records from 2 tables and show in RDLC Report
hi all,
its being a one day searching for the solution but No Luck.
I have two SQL tables tblstudetail and tblfeereceiptdetail.
i just want to count records from both tables and show in RDLC report.
I tried SQl Query Like This:
select a.session, a.course,
Count(CASE a.ADstatus WHEN 'OK' THEN 1 ELSE 0 END ) AS Admission,
Count(CASE s .I_receiptstatus WHEN 'OK' THEN 1 ELSE 0 END) AS Feeprint
from
tblstudetail a
FULL join
tblfeereceiptdetail s on s.studentID = a.studentID
where a.session = '2015' AND s.Fsession = '2015' AND a.adcat = 'Regular'
GROUP BY a.session,a.course
ORDER by a.course
The result Show the Same Value in Both columns
Session Course Admission FeeDetail
2015 B.A. I 275 275
2015 B.A. II 307 307
2015 B.A. III 255 255
2015 B.Sc. I 110 110
2015 B.Sc. II 105 105
2015 B.Sc. III 64 64
Actully I want to Count How many ADMISSION have been Taken(FROM tblstudetail) and How many FEE RECEIPT have been Print (From tblfeereceiptdetail).
please guide me for this as soon as possible.
thanks in advance...I am counting 'OK' in both the table columns I.e 'ADstatus' in tblstudetail and 'feereceiptstatus' in tblfeereceiptdetail
please suggest me -
Hello, looking for simple way or is it possible to reorder saving of records in a block.
(FORMS 6i)
Something like this:
1)I have detail block DB table (after Database query the data is) :
abc_fk , abc_order, abc_text
001 01 some text1
001 02 some text2
001 03 some text3
001 04 some text4
2)Now the user, wants to add new text after 1st line. I reorder the abc_order fields to
001 01 some text1
*001 02 NEW RECORD <-- new user input.*
001 03 some text2
001 04 some text3
001 05 some text4
After pressing commit button i get constrain error (uniqe key: abc_fk , abc_order).
Commiting process is going from top down , is it possible from buttom-up?
Now what happans is: forms put UPDATE on new record: 001 03 some text2 /when in database allready exsists record with same (sq, and order) that's: 001 03 some text3, so i get constrain error. (both record have same values: 001,03)
If forms could save records starting with
update 001 05 some text4,
update 001 04 some text3,
update 001 03 some text2,
insert *001 02 NEW RECORD <-- new user input.*
the problem is solved. Is this possible, to change order of saving?
Thank you for any help. :)Hey, your update kind'a work :)
If user inserts and updates (in between) more then one row.. the order changes...(not the way it shows on the screen)
picture this DB table:
001 01
<-------- insert here (new record 2)
001 02
001 03
001 04
<-------- insert here (new record 6)
001 05
001 06
AFTER COMMIT WE GET:
001 01
<-------- insert here (new record 2) ok 001 08
001 03
001 04
001 05
001 06
<-------- insert here (new record 6) not ok 001 07
001 08
So in pre-insert trigger how can i/we/you/program know that it should do :)
UPDATE TABLE_NAME
SET abc_order = abc_order + 1
WHERE abc_fk >= '002'
AND abc_order >= '05' and not ... AND abc_order >= '06' (which is the current new value of newly 2nd inserted statment
I changed pre-insert to:
UPDATE abc
SET abc_sq =:abc.abc_sq + 1
WHERE abc_id = :abc.abc_id
AND abc_sq >= :abc.abc_sq;
So i am still asking if it's possible, to change order of FORMS commitng from top-down to buttom - up. :)
I still want to know if there si a chance to change forms order of saving to save records starting with:
update 001 05 some text4,
update 001 04 some text3,
update 001 03 some text2,
insert 001 02 NEW RECORD <-- new user input.
Abut datatype you are right. We all use pading, and it's old database/table.. -
After backing up my hard drive and booting from my freshly made eDrive, I ran TechTool Pro 6's "Volume Rebuild" and after that ran it showed me the results, as usual. There were a few green items but one red. The "Leaf Count Record" went from 1777 to 625. I tried to find out what a Leaf Count Record is by googling it but only count find things on the error associated with this.
So my first question is: What is a Leaf Count Record?
Secondly, is there any problem with my Leaf Count going down, and should i be worried about it?
Note: i went ahead with the rebuild since all the information i could find on Leaf Count Record is mostly about the Leaf Count going up and not down.After backing up my hard drive and booting from my freshly made eDrive, I ran TechTool Pro 6's "Volume Rebuild" and after that ran it showed me the results, as usual. There were a few green items but one red. The "Leaf Count Record" went from 1777 to 625. I tried to find out what a Leaf Count Record is by googling it but only count find things on the error associated with this.
So my first question is: What is a Leaf Count Record?
Secondly, is there any problem with my Leaf Count going down, and should i be worried about it?
Note: i went ahead with the rebuild since all the information i could find on Leaf Count Record is mostly about the Leaf Count going up and not down. -
When I repaired my startup disk with Disk Utility, an invalid leaf count record error was reported. From looking at other posts, it appears that one of the recommended things to do for this is trying to repair the issue with Disk Utility. I tried this using Disk Utility 4.1. I replaced my directory with the rebuilt directory. Unfortunately, when I started back up from my install CD and ran Repair Disk, the invalid leaf count record error was reported again.
Any advice would be much appreciated... maybe I did something wrong.
ThanksFirst, I realized that I had the error message wrong. I should have wrote "Invalid Leaf Record Count" originally instead of "Invalid Leaf Count Record". I doubt this makes a difference, but just in case there it is.
Secondly, I am running 10.3.9 and have been doing so for quite some time. My understanding based on this is that DiskWarrior 4.1 should work. I took your advice and tried running DiskWarrior again. As I did previously, I simply booted from DiskWarrior because the disk I am trying to fix is my startup disk. I rebuilt and replaced the directory with DiskWarrior 4.1 again. As a matter of fact, I ran it multiple times while I had it going. I even ran it under the scavenge mode.
After doing this, I restarted the computer, ejected the DiskWarrior disc, and put in my install disc that came with my iMac. I booted from this CD and reran "Repair Disk" with Disk Utility. The error stills shows up. One thing to note is that my install disc came with 10.3.5 on it. Could this somehow cause a problem? My understanding is that you should always use an install disc for the major OS version you are running to run the "Repair Disk" function of Disk Utility. For example use an install disc for 10.3 if you are trying to repair a disk running 10.3.x or use an install disc for 10.4 if you are trying to repair a disk running 10.4.x.
Prior to ever running DiskWarrior, I used the fsck command from single-user mode. Interestingly, the error did not show up here. I thought the "Repair Disk" function with Disk Utility was similar to this command, but maybe there is enough variation to cause the difference. Do you guys have any idea, which one I should trust?
Let me know if any of this is incorrect. Any other suggestions regarding this error would be welcomed. I don't really understand what the error itself means. For now, I guess I will just leave it since I don't really know what else to do. Maybe in the future it will get worse and DiskWarrior will recognize it... I know that's asking for a problem! -
Hi All,
I'm using form builder 6i, I have a browsing Tab in my form that have one block and a lot of check boxes (5) for browse criteria that can be checked and concatenated together with || 'and' into a variable (condition) to make a (value) for the (Default_Where) property of the block.
As you know I can't issue a statement like this:
Select count(*) into count from MyTable where condition;
it causes an exception because select statement needs to state column names in where caluse, but I can just use the accumulated condition in the manner below:
set_block_property('MyBLOCK',default_where,condition);
I used it to execute the query, and it works well...but the problem is that I want to know the number of records returned from query in order to show it in a display item for the browser.
So...what I have to do ?? Any clue?
Thanks,
LoveSoulHi
u can also try...
If you want a rough hit count, you can use CTX_QUERY.COUNT_HITS in estimate mode (EXACT parameter set to FALSE).
With respect to response time, this is the fastest count you can get.
To count the number of hits returned from a query that contains a structured predicate, use the COUNT(*) function in a SELECT statement.
here is an example...
DECLARE
v_count NUMBER;
BEGIN
v_count := ctx_query.count_hits(index_name => my_index, text_query => 'oracle',
exact => TRUE);
:count =v_count; -- count display the result
END;Hope this helps...
Regards,
Abdetu... -
JDBC Driver 11.2.0.1.0 freeze after execute query with order by
Hi,
I have two tables : A and B
The table B has as foreign key the ID from table A.
I'm executing statment select id, foreing_id, name from table b order by foreing_id;
After executing query I see on database that query remains inactive and I don't receive any response on my client.
I've activate the oracle driver logs and I notice that driver stop working after these lines
Dec 26, 2012 7:05:22 PM oracle.jdbc.driver.OracleSql getSqlBytes
TRACE_30: return: [B@126f827
Dec 26, 2012 7:05:22 PM oracle.jdbc.driver.OracleSql getSqlBytes
TRACE_30: Exit
Dec 26, 2012 7:05:22 PM oracle.jdbc.driver.DBConversion getServerCharSetId
TRACE_16: Enter:
Dec 26, 2012 7:05:22 PM oracle.jdbc.driver.DBConversion getServerCharSetId
TRACE_16: return: 178
Dec 26, 2012 7:05:22 PM oracle.jdbc.driver.DBConversion getServerCharSetId
TRACE_16: Exit
Dec 26, 2012 7:05:22 PM oracle.jdbc.driver.DBConversion getNCharSetId
TRACE_16: Enter:
Dec 26, 2012 7:05:22 PM oracle.jdbc.driver.DBConversion getNCharSetId
TRACE_16: return: 2000
Dec 26, 2012 7:05:22 PM oracle.jdbc.driver.DBConversion getNCharSetId
TRACE_16: Exit
I'm using linux machine to execute this query, and I tried execute this same application in another linux machine and the query works.
It's very strange, for instance, this only happens if I have two records on table B using the id from table A, and also happens if only one record from table A.
Could someone help me what's going on with oracle driver?LOG ORACLE DRIVER_
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql initialize
TRACE_30: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql getSqlKind
TRACE_16: Enter:
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql computeBasicInfo
TRACE_16: Enter: "SELECT ID, TABLE_A_ID, NAME, URL, ISACTIVE FROM TABLE_B ORDER BY TABLE_A_ID"
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql computeBasicInfo
TRACE_16: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql getSqlKind
TRACE_30: return: 0
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql getSqlKind
TRACE_30: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement prepareForNewResults
TRACE_16: Enter: true, true
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement clearWarnings
TRACE_16: Public Enter:
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement clearWarnings
TRACE_16: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement prepareForNewResults
TRACE_16: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement doExecuteWithTimeout
TRACE_16: Enter:
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement doExecuteWithTimeout
TRACE_20: Debug: needToPrepareDefineBuffer = true
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement doExecuteWithTimeout
CONFIG: SQL: SELECT ID, TABLE_A_ID, NAME, URL, ISACTIVE FROM TABLE_B ORDER BY TABLE_A_ID
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement cleanOldTempLobs
TRACE_16: Enter:
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement cleanTempClobs
TRACE_16: Enter: null
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement cleanTempClobs
TRACE_16: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement cleanTempBlobs
TRACE_16: Enter: null
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement cleanTempBlobs
TRACE_16: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement cleanOldTempLobs
TRACE_16: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.PhysicalConnection registerHeartbeat
TRACE_16: Enter:
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.PhysicalConnection registerHeartbeat
TRACE_16: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.PhysicalConnection needLine
TRACE_16: Enter:
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.PhysicalConnection needLineUnchecked
TRACE_16: Enter:
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.PhysicalConnection needLineUnchecked
TRACE_16: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.PhysicalConnection needLine
TRACE_16: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.T4CConnection open
TRACE_16: Enter: oracle.jdbc.driver.T4CStatement@af72d8
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.T4CConnection assertLoggedOn
TRACE_16: Enter: "T4CConnection.open"
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.T4CConnection assertLoggedOn
TRACE_16: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement setCursorId
TRACE_16: Enter: 0
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement setCursorId
TRACE_16: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.T4CConnection open
TRACE_16: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement executeMaybeDescribe
TRACE_16: Enter:
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement executeMaybeDescribe
TRACE_20: Debug: rowPrefetchChanged = false, needToParse = true, needToPrepareDefineBuffer = true, columnsDefinedByUser = false
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.T4CStatement executeForDescribe
TRACE_16: Enter:
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.T4CConnection assertLoggedOn
TRACE_16: Enter: "oracle.jdbc.driver.T4CStatement.execute_for_describe"
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.T4CConnection assertLoggedOn
TRACE_16: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement cleanOldTempLobs
TRACE_16: Enter:
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement cleanTempClobs
TRACE_16: Enter: null
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement cleanTempClobs
TRACE_16: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement cleanTempBlobs
TRACE_16: Enter: null
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement cleanTempBlobs
TRACE_16: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement cleanOldTempLobs
TRACE_16: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.T4CConnection assertLoggedOn
TRACE_16: Enter: "oracle.jdbc.driver.T4CStatement.doOall8"
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.T4CConnection assertLoggedOn
TRACE_16: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.T4CConnection sendPiggyBackedMessages
TRACE_16: Enter:
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.T4CConnection sendPiggyBackedClose
TRACE_16: Enter:
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.T4CConnection sendPiggyBackedClose
TRACE_16: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.T4CConnection sendPiggyBackedMessages
TRACE_16: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql getSqlBytes
TRACE_16: Enter: true, false
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql getSql
TRACE_16: Enter: true, false
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql parse
TRACE_16: Enter: "SELECT ID, TABLE_A_ID, NAME, URL, ISACTIVE FROM TABLE_B ORDER BY TABLE_A_ID"
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql skipSpace
TRACE_16: Enter:
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql skipSpace
TRACE_30: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql handleODBC
TRACE_16: Enter: NORMAL
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql handleODBC
TRACE_30: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql parse
TRACE_16: return: SELECT ID, TABLE_A_ID, NAME, URL, ISACTIVE FROM TABLE_B ORDER BY TABLE_A_ID
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql parse
TRACE_16: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql getSql
TRACE_30: return: SELECT ID, TABLE_A_ID, NAME, URL, ISACTIVE FROM TABLE_B ORDER BY TABLE_A_ID
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql getSql
TRACE_30: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.DBConversion StringToCharBytes
TRACE_16: Enter: "SELECT ID, TABLE_A_ID, NAME, URL, ISACTIVE FROM TABLE_B ORDER BY TABLE_A_ID"
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.DBConversion StringToCharBytes
TRACE_16: return: [B@289d2e
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.DBConversion StringToCharBytes
TRACE_16: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql getSqlBytes
TRACE_30: return: [B@289d2e
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql getSqlBytes
TRACE_30: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.DBConversion getServerCharSetId
TRACE_16: Enter:
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.DBConversion getServerCharSetId
TRACE_16: return: 178
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.DBConversion getServerCharSetId
TRACE_16: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.DBConversion getNCharSetId
TRACE_16: Enter:
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.DBConversion getNCharSetId
TRACE_16: return: 2000
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.DBConversion getNCharSetId
TRACE_16: Exit
DDL TABLE A*
CREATE TABLE "TABLE_A"
( "ID" NUMBER NOT NULL ENABLE,
"NAME" VARCHAR2(50 BYTE) NOT NULL ENABLE,
"TYPE" NUMBER NOT NULL ENABLE,
"VERSION" VARCHAR2(30 BYTE) NOT NULL ENABLE,
"ISIMPLIED" NUMBER(1,0),
CONSTRAINT "TABLE_A_PK" PRIMARY KEY ("ID")
USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "APPDATA" ENABLE
) SEGMENT CREATION IMMEDIATE
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "APPDATA" ;
CREATE UNIQUE INDEX "TABLE_A_NAME_UNIQ" ON "TABLE_A" ("NAME")
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "APPDATA" ;
CREATE UNIQUE INDEX "TABLE_A_PK" ON "TABLE_A" ("ID")
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "APPDATA" ;
DDL Table B:_
CREATE TABLE "TABLE_B"
( "ID" NUMBER NOT NULL ENABLE,
"TABLE_A_ID" NUMBER NOT NULL ENABLE,
"NAME" VARCHAR2(50 BYTE) NOT NULL ENABLE,
"URL" VARCHAR2(2000 BYTE) NOT NULL ENABLE,
"ISACTIVE" NUMBER(1,0) NOT NULL ENABLE,
CONSTRAINT "TABLE_B_PK" PRIMARY KEY ("ID")
USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "APPDATA" ENABLE,
CONSTRAINT "TABLE_A_FK" FOREIGN KEY ("TABLE_A_ID")
REFERENCES "TABLE_A" ("ID") ON DELETE CASCADE ENABLE
) SEGMENT CREATION IMMEDIATE
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "APPDATA" ;
CREATE UNIQUE INDEX "TABLE_B_NAME_UNIQ" ON "TABLE_B" ("NAME")
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "APPDATA" ;
CREATE UNIQUE INDEX "TABLE_B_PK" ON "TABLE_B" ("ID")
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "APPDATA" ;
Comments*_
After line: Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.DBConversion getNCharSetId TRACE_16: Exit the driver freeze.
I can see on DB that query keep INACTIVE and oracle driver doesn't throws any exception.
My Oracle version is 11.2.0.1.0 and as well as oracle driver, I also tried use the version 11.2.0.3.0 but the problem persists.
More facts:
If I remove or replace by another field the clause order by TABLE_A_ID from query the query works.
In this case, I have two recods on TABLE_B with TABLE_A_ID equals 2, if I remove one of these records the query works.
The bug happens only one specific machine where the number of routers is bigger than another machine that works with all possible scenarios.
Edited by: 978737 on Dec 27, 2012 12:11 PM
Maybe you are looking for
-
I seem to have music files in various places on my laptop, on my husbands computer and our main imac. What we want to do is put all music on imac so when each of us logs on we have the same files availabe in itunes, but we logon seperately so we can
-
Error with WebServices and object hierarchy
Hello, I'm using Web Services (deployed on Axis Server) with SJC. SJC don't understood the object hierarchy. It's seem to be the same problem than in post http://forum.sun.com/jive/thread.jspa?forumID=123&threadID=50290 and http://forum.sun.com/jive/
-
Swf files from my web site do not show in Mozilla/5.0
I HAVE DEVELOPED A WEB SITE AND THE SWF FILES AS WELL AS THE .MOV FILES DO NOT SHOW WITH Mozilla/5.0 I would like users of my web site to automatically install plugins and not manually Thanks
-
Hi, I have an msi industrial motherboard. It is the min itx mobile core 2 duo motherboard which I use as a super quiet htpc/workstation. I've built my own case etc. and now I want to connect a 3.5mm front audio socket to the motherboard. I can't make
-
Is there a plugin or utility that converts .pages to and from LaTeX?
If not, how do we ask Apple for this sort of functionality as an enhancement request? Pages is a nice neat editing and authoring tool. I'd love for it to be extensible, and enable it to save in open formats. RTF is not an open format, by the way. M$