Forms :: Generating Sequence - Get Serial Number?
Dec 21, 2011
i want to get serial numbers in oracle forms. i have one data block with 10 rows and a non database display item with corresponding length as that of the original data block .
when ever i am executing the form i want to see the serial number generated in the display item and when i inserted a new item or row it should show the corresponding rownum.
eg:
empno name serialno
5 tom 1
4 tinil 2
6 sofy 3
7 john 4
1 albert 5
2 michel 6
i want to get the above answer using forms.
View 7 Replies
ADVERTISEMENT
Aug 23, 2011
how do you generate serial numbers? i have an invoice where i have to add items, so i want the numbering to start from 1 everytime i start a new form and increment by 1 as i i enter a new record. For this i have put my code in when-new-record-instance but problem is if i delete a record and enter a new one, the serial number starts from the nex number.
For ex. if i have 4 items with serial numbers 1, 2, 3, 4 and i delete the item at no. 3 and add a new item , the serial number comes as 5.
proper code to generate the serial numbers?
View 7 Replies
View Related
Feb 9, 2010
I need Sequence generate in each row in tabular style form
Like
FA0015
FA0016
FA0017
(I dont want to use sequence because when i delete the row its conceder delete row in sequence )
View 4 Replies
View Related
Sep 5, 2011
I have form with master detail relation ship (invoicing form) the detail block is tabular, displaying upto 7 records...
Now my clients wants to show the serial number along with each record while feeding the data (this includes when insert, editing, deleting / clearing records) he wants to see the serial number as in MS access / MS techniques.
I tried to use the system variable to use :system.cursor_record; but this dose not works.(in insert/edit/delete/clear record)
View 5 Replies
View Related
Jun 2, 2010
I have created simple data block by wizard and taken tabular layout 10 rows and 6 columns
i want to generate serial number on first column .....
what need to use..?
View 11 Replies
View Related
Jan 28, 2011
DECLARE
P_LAST_UPDATE_DATE KPC_MMS_STD_CHKPOINTS.LAST_UPDATE_DATE%TYPE;
BEGIN
INSERT INTO KPC_MMS_STD_CHKPOINTS (CHK_POINT_CODE,CHK_POINT_DESC,CHK_POINT_FREQUENCY,CREATED_BY,
CREATION_DATE,LAST_UPDATED_BY,LAST_UPDATE_DATE)
VALUES (:P13_CHK_POINT_CODE,:P13_CHK_POINT_DESC,:P13_CHK_POINT_FREQUENCY,:P13_CREATED_BY,:P13_CREATION_DATE,
:P13_LAST_UPDATED_BY,:P13_LAST_U PDATE_DATE);
COMMIT;
END;
View 1 Replies
View Related
Mar 12, 2013
I have following table.
CREATE TABLE ABC
(
DPT_NUM NUMBER,
LOT_NUM NUMBER,
ASSOCIATED_WITH_LOT NUMBER
);
SET DEFINE OFF;
Insert into ABC
[code]......
Now i run follwoing query and result is
select * from abc
DPT_NUMLOT_NUMASSOCIATED_WITH_LOT
1501
1502501
1509501
1511
1503
1516
1522
1565
1569565
2601
2602
2604602
2607
2508
I need following result
DPT_NUMLOT_NUMASSOCIATED_WITH_LOT Serial_Number
1501 1
1502501 2
1509501 2
1511 3
1503 4
1516 1
1522 2
1565 3
1569565 3
2601 1
2602 2
2604602 2
2607 3
2508 3
Note that serial number must reset after each 4 lot_num againt dpt_num. Not that where lot is associated in associated_with_lot there serial number must be same as serial number is for associated lot.
View 7 Replies
View Related
Aug 4, 2012
I have one table as per the attachment, with id(Primary key),level,name and Srno.Now I want to maintain Sr. if user transfers level 2 of one block (level 1) to another block.is it possible through any oracle function.
View 8 Replies
View Related
Jun 30, 2012
I have two tables,
CREATE TABLE TBL_ID(
SERIAL NUMBER(3),
ID NUMBER(5));
CREATE TABLE TBL_ID2(
ID NUMBER(5));
[code]...
I want translate id from TBL_ID2 to TBL_ID, and make new serial as max serial + 1 I tried
insert into TBL_ID(serial,id)
select (select max(serial) + 1 from ),id from TBL_ID2
Desired Output after insert
select * from TBL_ID
SERIAL ID
------ --
1 10
2 20
3 50
4 60
5 90
View 3 Replies
View Related
Jul 31, 2013
I have follwoing Table
create table abc( prd_cod number,tax_num number, tkt_num number,shd_cod number,cnt_num number,ctn_num number);
Insert into ABC(PRD_COD, TAX_NUM, TKT_NUM, SHD_COD, CNT_NUM, CTN_NUM) Values (1, 1, 1, 1, 1, 1);
Insert into ABC(PRD_COD, TAX_NUM, TKT_NUM, SHD_COD, CNT_NUM, CTN_NUM) Values (1, 1, 1, 1, 2, 1);
Insert into ABC(PRD_COD, TAX_NUM, TKT_NUM, SHD_COD, CNT_NUM, CTN_NUM) Values (1, 1, 1, 2, 1, 1);
[code]...
Now i have following data
PRD_CODTAX_NUMTKT_NUMSHD_CODCNT_NUMCTN_NUM
111111
111121
111211
112111
151211
211111
I need to query above data with a column "Srl_Num". Its serial number and serial should like 'AA1','AB1'. In serial number is last digit 1 is "Ctn_Num" Column Value. First Letter 'A' of serial number is 'A' and second letter of serial number will change. When it reaches till 'Z' Then first letter will change.I mean if serial number is 'AZ1' Then next serial number will be 'BA1','BB1','BC1' and so on.
I need query to show data like
Srl_Num PRD_CODTAX_NUMTKT_NUMSHD_CODCNT_NUMCTN_NUM
AA1 111111
AB1 111121
AC1 111211
AD11 12111
AE1 151211
AF1 211111
View 3 Replies
View Related
Mar 27, 2007
How can i print serial no of records in sql query? I know I can achieve this with selecting rownum but it gives wrong data if used with group by like below
select rownum,deptid from emp group by rownum,deptid order by rwnum
View 2 Replies
View Related
Mar 27, 2012
In my form I have a submit button, when i click on it a sequence number to be generated and displayed in a text box.
I have created a sequence and tried inserting into table, it works fine however it's not getting displayed in form.
Note: Tried giving sequence.sequence_name.nextval in initial value of the text box, didn't work showed FRM-11324 error.
--When button pressed--
DECLARE
v_seq number(20);
BEGIN
select seq_name.nextval
into v_seq
from dual;
[Code]...
View 15 Replies
View Related
Mar 6, 2012
we are inserting a data in table by selecting data from another table.This is part of a very big procedure and the code is like
Loop
SELECTMAX(biz_trn_no) + 1
INTOv_biz_tran_no
FROMnew_business_transactions
WHEREnb_srno = nb_sr_no;
[code]....
Is there any way I can get this functionality without using a sequence? I assume corelated query would be slow and analytic.
View 6 Replies
View Related
Mar 9, 2011
I have the following select query that works perfectly fine. Returns 25 rows based on the descending order of the price.But, I want add one more expression to this list of columns in this query (apart from customer_id).
the expression should look like Cust-01 for the first customer from the below query all the way to Cust-25 for the last customer.But how can I can generate 01 to 25 in oracle?
select customer_id from
(select customer_id from capitalPLAN
where member_status = 'MEMBER' AND customer_id NOT in ('156','201','1385','2125','3906','165')
order by price desc
)
where rownum <= 25
View 4 Replies
View Related
Jun 16, 2004
I'm trying to read some data from external device via COMM Port.
Application is running n server and device is connected localy on my PC.
My device iz DPI605R for purpose of� pressure measuring.
View 6 Replies
View Related
Jan 3, 2012
Is it possible to communicate with a serial device (via COM1) with oracle forms / webutil? I am able to communicate in java using RXTXcomm, but I am having problems making a bean that uses it (getting security errors and yes, I have signed the jars).
Basically, I have a scale hooked up to my COM1 port and want to be able to send commands (zero and tare) to it and read the weight from it through a form or java bean.
View 5 Replies
View Related
Sep 17, 2012
In our production, we have two nodes in the cluster. We use the sequence for one of the main table for primary key. Our application is expecting sequence number increments along with created date time stamp. Right now sequences are cached for each node and it creates problem for the application. We would not like to use NOCACHE option because it causes performance issue.
This is the current scenario -
Transaction #1 on Node 1 - Seq ID 1 - Time Stamp 12:01
Transaction #2 on Node 2 - Seq ID 51 - Time Stamp 12:02
Transaction #3 on Node 1 - Seq ID 2 - Time Stamp 12:03
When I try to query based on the time stamp, primary should also go up. To be very clear on what I would like to have, please consider the following example.Without using NOCACHE option, I need to have the data in the following order.
Transaction #1 on Node 1 - Seq ID 1 - Time Stamp 12:01
Transaction #2 on Node 2 - Seq ID 2 - Time Stamp 12:02
Transaction #3 on Node 1 - Seq ID 3 - Time Stamp 12:03
In other words, sequence number should always increment along with the time.
View 2 Replies
View Related
Feb 14, 2012
I want to transfer data from Oracle form 9i to serial port.
Serial port is connected to electric board to show.
View 2 Replies
View Related
Mar 2, 2013
I have a following select statement where I am not generating a sequence in any of these WHERE clause, GROUP BY or ORDER BY clause, DISTINCT clause, along with a UNION or INTERSECT or MINUS or sub-query.
I have query like this
"SELECT
AER_ID_TEMP.AER_ID,
AER_ID_TEMP.D__PRNO,
AER_ID_TEMP.D__PCNT,
CAST((select char_value from aris_param_data where param_id = 101)||seq_record_id.nextval AS INT) as RECORD_ID
FROM AER_ID_TEMP"
but still encountering a error "ORA-02287 sequence number not allowed"
View 2 Replies
View Related
Oct 15, 2010
CREATE OR REPLACE TRIGGER audit_emp AFTER
INSERT OR UPDATE OR DELETE ON Employee FOR EACH ROW
declare
my emp_audit%ROWTYPE;
begin
if inserting then my.action := 'I';
[code].......
It works alright but i need to enter a sequenced value to a column audit_id which is a column in the emp_audit table when a change takes place, but when i define the variable it gives be an error as bad bind variable so where can i define this column in this trigger so get a sequenced value every time i d or u occurs .
View 5 Replies
View Related
Mar 31, 2011
Is there any way to get the last Sequence Number generated regardless the Sequence name? Something like dbinfo('sqlca.sqlerrd1') within Informix?
Imagine I have 2 sequences. Imagine that I run both several times until 20:00 hours. Imagine that at 21:00 hours I would like to know what was the last generated number created by any of the sequences. I don't wann know wich sequence generated the last NEXTVAL, I only want to know the value of the last NEXTVAL used.
Is it possible without mentionating the Sequence name?
View 4 Replies
View Related
Jul 26, 2010
I am using following Procedure/function for inserting DATA into New table:
PROCEDURE NEMPID IS
OFFICER CHAR(1) := '0';
OFFICIAL CHAR(1) := '9';
CURSOR DOJSUP IS
[Code]....
Get/Retrieved data from personal and cat9 files and Inserted Data stored in file NEMP as
EMP_ID NEMP_ID
------- ---------
111 01-8722
132 01-9224
88 01-8318
114 01-8717
106 01-8517
[Code]....
I want also generate a sequence/serial number for same category/designation of personals/employees exist in personal file ?
Like 001, 002 ,003 at the end of NEMPID field.
EMP_ID NEMP_ID
------- ---------
111 01-8722-001
132 01-9224-002
88 01-8318-003
114 01-8717-004
[Code]....
HOW CAN GENERATE SEQUENCE/SERIAL NUMBER OF SAME CATEGORY EMPLOYEES AND INSERT INTO TABLE NEMP?
View 16 Replies
View Related
Jun 6, 2011
I am facing issue with my sequence number about sequence number generated..I want it to follow the sequence all the time, i.e. it should take next incremental number to last generated seauence, but it generates random one all the time, i.e
s.nextval() = 4
s.nextval() = 5
s.nextval() = 10
s.nextval() = 543
s.nextval() = 544
My sequence defination is as below
CREATE SEQUENCE s
START WITH 1
MAXVALUE 999999999999999999999999999
MINVALUE 1
NOCYCLE
CACHE 20
View 11 Replies
View Related
Jun 14, 2005
I want to connect a biometric device with my system, through serial port / parallel port. And want to permit only valid users to the system.
View 18 Replies
View Related
Dec 7, 2010
I have Table Data in format :-
--------------------------
ABC
ABC
ABC
XYZ
XYZ
and i have a requirement where I need the output in this format.
-------------
ABC 1
ABC 2
ABC 3
XYZ 1
XYZ 2
what query to be used for this
View 2 Replies
View Related
Feb 21, 2013
I want to insert same sequence number for repeated data else new sequence.
my data is as below
EMP_NAMEEMP_INV
PrasCTI
PrasCTI
ShariqWitness
KateCTI
ShariqAssisted
ShariqWitness
the first 2 record are same Pras CTI and Pras CTI so i want my sequence generate value once as below
1 Pras CTI
1 Pras CTI
2 Shariq Witness
3 Kate CTI
4 Shariq Assisted
2 Shariq Witness
Shariq and witness are repeating so same sequence number but Kate CTI occured once so nextval of sequence
How can i acivee it
CREATE TABLE EMP_INV
(
EMP_NAME VARCHAR2(100 BYTE),
EMP_INV VARCHAR2(100 BYTE)
)
Insert into EMP_INV
(EMP_NAME, EMP_INV)
Values
('Shariq', 'Witness');
[Code]...
View 12 Replies
View Related
Jun 1, 2010
I have a result set with three columns as 'Product Category', 'Product' & 'QtySales' and 10 rows, sorted in the order Product Category, Product. This means, a product category will have one or more products under it.
Now i want to add a fourth column to my result set, which should display a incremental number sequence from starting from 1, 2, 3.. for each row. Also when the value of the Product Category (1st column) changes, this sequence should be restarted again from 1.
Col1 Col2 Col3 Col4
PC1 P1 10 1
PC1 P2 20 2
PC2 P3 30 1
PC2 P4 10 2
PC2 P5 15 3
PC3 P6 25 1
View 1 Replies
View Related
May 17, 2012
I have a table ABC with two columns NAME and SEQUENCE. The valid values of sequence are from 1..50. The table may not have all the Sequence number. For example following is the data in my table..
Quote:NAME SEQUENCE
------------------------
Jonh| 5
Amy| 1
Suresh| 3
I need a SQL to get the data like
Quote:NAME SEQUENCE
------------------------
Amy| 1
| 2
Suresh| 3
| 4
Jonh | 5
|6
|7
..
..
..
|50
Basically I want to have rows for the sequence numbers which are not present i my table. I thought of using the following query to generate a sequence and then join, but does not work.
select rownum from dual connect by rownum <=50
I tried something like
with temp as (select name, sequence from abc where supp_ref_order is not null order by sequence )
select rownum as num, temp.name from dual, temp connect by rownum <=50 where temp.sequence =num
View 12 Replies
View Related
Feb 13, 2013
I need generate an unique number without sequence. I am using Oracle 11.2, here is the details. The column idSeq is unique withing one specific idType. I don't want a sequence for each idType.
create table tb_test (idSeq number(5), idType number(5), addr varchar2(256));
insert into tb_test
(select case when idSeq is null then 1 else max(idSeq)+1 end, 3, 'Main street');
I am having ORA-00937 : not a single-group group function error
View 23 Replies
View Related
Dec 5, 2012
create sequence seq minvalue 1 maxvalue 99999 start with 1 increment by 1;
create table t ( id number, b date);
insert into t values (seq.nextval,sysdate);
update t set b=sysdate-1 where id=seq.currval;
update t set b=sysdate-1 where id=seq.currval
*
ERROR at line 1:
ORA-02287: sequence number not allowed here
how can i update as above ..
View 7 Replies
View Related