Forms :: Display Record Counts / Unique Names

Sep 25, 2012

I have a table

TAB1 with data
no name
1 abc
2 abc
3 xyz
4 xyz
5 cvb

now I would like to create a form with name counts as

abc 2
xyz 2
cvb 1

I would like to create a datablock to display all the unique names, not sure where I should be writing the query to display unique names. I would like to create a textitem box to display the counts when the form is compiled, but not sure which trigger to use to write the query.

View 2 Replies


ADVERTISEMENT

Getting Different Record Counts When Select Overall?

Nov 7, 2011

I have a UNION query having 3 parts, 1st gets date, 2nd data and 3rd displays the formatted data count :WHERE clause of 2nd and 3rd queries are same.

Problem is that I an getting different record counts when I select the overall count of records given by the whole UNION query and when I run to count the records given by each query individually.First count. Here I am selecting the overall count of records given by the query :

select count(1)
from (
SELECT SUBSTR ( '0'
|| TO_CHAR (SYSDATE, 'MM/DD/YYYY')
|| TO_CHAR (SYSDATE, 'HH:MI:SS')
|| LPAD (' ', 180)

[code]...

This count is : 1751525 Second count. Now when I run to count the records given by each query individually, here is the result

select count(1) a
from (
SELECT SUBSTR ( '0'|| TO_CHAR (SYSDATE, 'MM/DD/YYYY') || TO_CHAR (SYSDATE, 'HH:MI:SS')
|| LPAD (' ', 180)|| chr(13), 1, 200 ) dtl_record from dual
select count(1) b from (
SELECT '1'

[code]...

why there is difference of 1 (1751526 - 1751526) in the count results.

View 1 Replies View Related

Forms :: Choose Lov In First Record That Won't Be Display In Second Record Lov

Sep 10, 2012

I have one multi record block in that i have one LOV..If i choose lov in first record that won't be display in second record lov...

View 4 Replies View Related

Forms :: How To Check For Unique Value In Text Item In Multi-record Block

Mar 13, 2013

I have a multi-record block with several text items.

On one of the text items i want to enter a value and then check whether the same value for the item has already been entered on any other records within the block.

If it has already been entered then i want to display a message and null out the field.

I have tried using app_record.for_All_records from a when-validat-item trigger but this does not work as you get a 'FRM-40737 Illegal restricted procedure go_block in when-validate-item trigger ' error

View 17 Replies View Related

Forms :: Oracle Unable To Update Record - Unique Key Violation Error

May 10, 2011

I have the search screen in my form so after searching if i select the row by using the button it will navigate the first tab page that is "gas" screen here if i tried to change the value like update and save the form it is not allowing me to update the value raising the error message "oracle unable to insert the record". if i see the "display error" in menu it is having the select statement with error "unique key violation error ora-00001".

In save button containe "commit_form"

View 15 Replies View Related

SQL & PL/SQL :: Loading Unique Text File Names With Utl_file

Oct 9, 2012

I am using an Oracle 8i database.We intend creating a dbms_job that would run every 5 minutes. The job executes a script that would use utl_file to read two text files (a header file and detail file) from a particular directory and load the data into temporary tables. The naming convention of the files are Parts_Master_DD/MM/YY HH:MI:SS and Parts_Stats_DD/MM/YY HH:MI:SS. Both files to be stored in the same directory.

If the file name was constant ie. Parts_Master, Parts_Stats I would not have a problem. However with each file name now going to be unique, how do I handle this using utl_file. To add to my dilemma, within an hour more than one set of files could be piped to the directory to be read into the database.

View 3 Replies View Related

Forms :: Display Next Record?

Apr 22, 2010

I have a form in which the fields are not database items i want to display the next record, i know i can use the next_record for the same but it does not work since it is not the database item, is there any way when the item is not the database item and i can see the next record. I use the cursor for loop but since it fecthes all the records in one go it cannot display one record at the time in the form..

View 3 Replies View Related

Forms :: How To Display Current Record

Mar 12, 2013

I have problem about displaying current records with same table(tbl_pawnitem). I have 2 transactions which are the pawned transaction and for sale transaction. and both transactions save into tbl_pawnitem table..i want to display only in my list the for sale transaction without deleting the records of pawned transaction. what condition i will use?

View 5 Replies View Related

Forms :: Display Record On Non Database Item?

Sep 17, 2012

I want to display my query select * from Clinical_Chart_CCHPI in non database item which is 1000 Char. I want to display that query when my forms execute.below is the test case.

Create table Clinical_Chart (Chart_Number Char(12),MR_NO Char(13));
Create table Clinical_Chart_CCHPI (Chart_Number Char(12),serial_number number,Date Date, Remarks Varchar(1000));
--------------------------
insert into Clinical_Chart(1,1);
insert into Clinical_Chart_CCHPI (1,1,01-JAN-

[code]...

I have taken one non database block and my item Test which is non-database too. But no result is coming i have attached JPEG file too.

View 4 Replies View Related

Forms :: Display Alert When Click On Insert Record In Tool Bar?

Jun 26, 2013

I want to display an alert when we click on Insert Record in tool bar. I put allow update->yes and insert->no.

but when i click on the insert record in tool bar it showing message only.

Instead of message I need an alert using triggers. I added the image also.

View 1 Replies View Related

Forms :: Display All Records One By One As User Click On Next Record Button

Jul 13, 2010

I have created one tab canvased form

On first tab I am taking input (search criteria)
on that input i am trying to display all records one by one as user click on next record button....

for that i used when-tab-page-change trigger for first record display and it display correctly.but for further record what should i need to write on next_record command button so all record i can see one by one.

View 1 Replies View Related

Forms :: Unable To Display A Message When Record Status Is Changed?

Jun 2, 2010

I have one requirement.i.e I want to display 'Do you want to save the changes you have made?[YES/NO]' message when record status is changed.In my form if i enter some value to the actual qty(db item) and press 'x' button it does't prompting 'Do you want to save the changes you have made?' message.

For displaying this message i have written following code in the APP_CUSTOM body:

IF (wnd = 'XXMZ_MRS_DET')
THEN
lv_wnd_stat := get_window_property('XXMZ_SUMMARY',VISIBLE);
if lv_wnd_stat = 'TRUE' THEN
IF :SYSTEM.form_status = 'CHANGED' THEN
CLEAR_BLOCK(ASK_COMMIT);
ELSE

[code]....

if i write above code in the app_custom body it's prompting the above message.But if i click 'YES' it does't save the records?

How can i save the records when i click 'yes'?

View 3 Replies View Related

PL/SQL :: Display Names And Packages

Jul 17, 2013

NAME         package

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

Anand         basic           Anand         pascal    Juliana       cobol           Kamala        dbase     Mary          oracle    Mary            c         Partick        c++             Qadir         assembly        Qadir            c               Ramesh         dbase     Remitha          c               Remitha        assembly        Revathi         pascal    Revathi         basic          

View 5 Replies View Related

Write A Script To Display First / Last Names Of Targets That Have ID Less Than 3?

Aug 30, 2008

Write a script to display the first and last names of the targets that have id less than 3.

DECLARE
fname targets.first_name%TYPE;
lname targets.last_name%TYPE;
CURSOR id IS
SELECT target_id FROM targets;
BEGIN
FOR val IN id
LOOP
IF val < 3
THEN

[code]....

I tried using without %TYPE but could not get the result.

View 1 Replies View Related

PL/SQL :: Using A Subquery To Display Names And Max Salaries By Department / HR Schema

Mar 14, 2013

Using the HR schema, I'm trying to write a query which will display the names and salaries of those employees who earn the highest salaries in their respective departments.

I wrote the query:

SELECT first_name, last_name, salary
FROM employees
WHERE salary =
(SELECT department_id, MAX(salary) FROM employees GROUP BY department_id);

However, this query does not execute correctly but I'm not sure why?

View 7 Replies View Related

PL/SQL :: Avoid Record Creation With Similar Names

Oct 17, 2013

am trying to add a validation in Oracle forms using Oracle DB.in a Oracle table consider there is a record named 'Netbook' then if I try to create another record with name 'Netbooks', then a Oracle warning message should be displayed stating similar name 'Netbook' is already available. same way, if NETBOOKS is already available in table and if user try to create another record NETBOOK then same warning message netbooks is already available should be shown. 

View 17 Replies View Related

SQL & PL/SQL :: How To Show Unique Record Only In Query

Jun 20, 2012

I am getting a following odd result where the same a Job could be linked to multiple enquiries. What I want it to show is just one job if its linked to multiple enquiries. I show you some sample result:I wrote the following SQL for it:

SELECT
'Enquiry' as Origin,
job.job_number,
enquiry.enquiry_number as Defect_or_Enquiry,
job.site_code,
central_site.site_name,
job.priority_code,
priority.priority_name,
job.target_comp_date,
'Target Completion Date required' as Due_Date
[code]....

Is there anything you would add so that it shows just a unique job number where the job has multiple enquiries linked to it? I tried putting SELECT DISTINCT but that did not work.

View 11 Replies View Related

Forms :: Checking For Password Verification For 3 Counts?

Dec 22, 2011

I have made a simple form in which user will be entering his username and relevant password to get authorised. My issue is , if the user is entering wrong password for 3 times then both fields should get disabled. I did the form until the point where it checks wether the user is authorised or not. But how to give count on failure of passwords.

View 5 Replies View Related

Can Create Unique Index On Subset Of Record

Apr 9, 2013

I have following records in table (T)

Idtype_cdNbrDt
1A1001/1/2013
2A101Null
3B100Null
4C100Null
5A100Null

Based on the type-cd, I need to create Unique index on Nbr & Dt columns

In above record set, I want to create Unique index on type_cd=A and not on B&C (Here i expect duplictes for a combination of Nbr & Dt)

Can we create Unique index on subset of record?

View 1 Replies View Related

SQL & PL/SQL :: How To Display Missing Item Names For Each Item Code

Feb 16, 2010

I have a table with the following data.

item_code item_name
101 Pen
101 Pencil
101 Scale
102 Pen

[Code]...

My aim is to display the missing itemnames for each itemcode.

For each ITEM_CODE there should be four items i.e Pen,Pencil,Scale and Marker If any itemcode missed any of the itemnames those records should display in the output.

So the output should be like this

101 Marker Because the item Marker is missed.
102 Pencil Because the items Pencil and Marker are missed.
102 Marker Because the items Pencil and Marker are missed.

For itemcode 103 no records should be displayed because it having all four itemnames.

View 21 Replies View Related

SQL & PL/SQL :: Display Some Value When There Is No Record In Table

Jul 8, 2010

I have a following table,

create table test ( col1 date,col2 number);

Data:

col1 Col2
----------
NULL NULL

select * from test where col2=123 will give me null because It doesnt have any values, But can we display some harcoded value when I do not have anything ?

View 9 Replies View Related

SQL & PL/SQL :: How To Display The Duplicate Record In Table

Jun 30, 2011

how to display the dupicate record in table

View 1 Replies View Related

PL/SQL :: Only Display A Column Value One Time For A Record / Not A Static Value

Jan 7, 2013

I am trying to only display a column value one time for a record, not a static value. The value changes and there can be many values. I do not think grouping will work since the Date value is dynamic. I am using Oracle for Toad 10.5. There are 4 records with this test data.

select Date, Person, Language, Country
from TableATableA
Date            Person  Language   Country
01/25/2013       James   English
12/20/2012       James   English
US

[code]....

View 3 Replies View Related

SQL & PL/SQL :: How To Display The Status And Record Count In Separate Rows

Mar 6, 2013

My problem is i need to display the status and the record count in separate rows.How can i do it

Example

SELECT 'A' STAT, COUNT(A) CNT,'B' STAT, COUNT(B) CNT,'C' STAT, COUNT(C) CNT
FROM TAB1;

OUTPUT SHUD BE LIKE

STAT COUNT
A A_cnt
B B_CNT
C C_CNT

View 13 Replies View Related

Application Express :: Message Display Before Submit To Record

Nov 5, 2012

I have created two page process with two buttons "APPROVE" AND "CANCEL" button. first page process running approve invoice procedure on approve button and second page process running cancel invoice procedure on cancel button. i want to display massage before approve invoice and cancel invoice (DO you want to approve invoice) on approve button and (Do you want to cancel invoice on ) cancel button.

Working with apex4.1.

View 4 Replies View Related

SQL & PL/SQL :: Find All Column Names In All 20 Tables That Have Same Names?

Jul 7, 2010

I have 20 tables. In all 20 tables, some of column names are same and some are different. I need to find all column names in all 20 tables that have same names.

create table t1 (
col1 varchar2(10),
col2 varchar2(10));
create table t2 (
col1 varchar2(10),
col3 varchar2(10));
create table t3 (
col1 varchar2(10));

View 1 Replies View Related

Application Express :: Display Custom Message For Report When Record Count Returned

Nov 8, 2012

Our application has a homepage that displays results of several SQL statements that are defined as reports. One report in particular should only display a custom message when Count of Invoices having a particular status > 0, and not the actual invoice count itself.

I have gotten the layout to not display the count but I need to be able to display a custom message that says "Problem Invoices exist. Please see Invoices Report for more information." I've looked over the Report Attributes definition page but I cannot find how to display this custom message.

View 2 Replies View Related

Forms :: Populating Values To Record Group From Multi Record Datablock

Jul 26, 2012

My procedure proc_ex is in when_validate_item trigger

I have one Multi Record data block in my form with values in its items

I need to Populate multi record block values to one Record Group using

add_group_row,
add_group_column,
set_group_char_cell to populate values to record group

Let us suppose my multi record data block looks like

item1 item2 item3 item4
10 20 50 70
25 15 30 45
45 90 47 38
75 25 85 90
30 56 78 80

how to populate these multi record datablock values to Record Group ???..Eagerly waiting for your Replies

View 3 Replies View Related

Forms ::create History Record For Each Record Whether Updated Or Not

Sep 13, 2011

I have a fairly standard Purchase Order form which contains pre-loaded data (been uploaded from an XML file).When the Purchase Order is processed, the form updates a Price History table only if the Price on the PO_Details changes.The code for updating the price history table is contained in a PRE_UPDATE trigger on the PO_Details Data Block.

No other data changes on the PO_Details table.I now want to change this so that the Price History table is updated even if the price does not change i.e I want to create a history record for each record on the PO_Details irrespective of whether it was updated or not.

Is there an alternative trigger that I can move my code to (ie move it from PRE_UPDATE) to some other trigger that is fired for each PO_Details record even if there is no change.

View 4 Replies View Related

Forms :: Only New Record Have Saved Last Record No Longer Exist

Jun 29, 2013

I create a data block on a table when I am inserting new record only one record have been saved. Last record no longer exist.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved