Forms :: Null Value Not Passing
Oct 18, 2011
I am trying to pass null value '' in form but still failed
---SQL---
select distinct column1 from abc
Y
NULL
two records found.
---FORM---
I have a list item name user_pick which is in two values SOUND-Y, DAMAGE-'' passing null value
--BUTTON--
select count(column1) into A from abc
where column1=:user_pick;
when user pick from list SOUND it is ok..When user pick damage this will show 0 means null value are not passing correctly.i also tried in radio group,check box
View 4 Replies
ADVERTISEMENT
Jun 1, 2009
i want to pass parameters from xyz form to abc form when i press a button. how to pass parameters.....
View 5 Replies
View Related
Sep 17, 2010
I need to pass two parameters (STUD_ID) and (TERM) from Form A to Form B. I've read a lot but I'm not familiar with terms and oracle jargon yet! So I really need your straight forward clarification
From the Calling form I'm using when_button_pressed trigger...what shall i write in here?! In the Called form, I'm declaring the following under (When_new_form-instance):
declare
p1_id paramlist;
stud_id number(8);
term number(5);
begin
p1_id := get_parameter_list(stud_id);
p1_id := get_parameter_list(term);
:TEST_STUD_CRSE_REG.stud_id :=:parameter.stud_id;
:TEST_STUD_CRSE_REG.term :=:parameter.term;
next_block;
end;
-----------------
on the calling form:when_button_pressed I am using:
DECLARE
p1_id paramlist;
stud_id number(8);
term number(5);
BEGIN
call_FORM('test16SEP',NO_HIDE);
GO_BLOCK('TEST_STUD_CRSE_REG');
set_block_property('TEST_STUD_CRSE_REG',default_where,'STUD_ID=:TEST_STUDENT_INFO.STUD_ID');
execute_query;
END;
View 2 Replies
View Related
Jul 4, 2011
I am working on 6i reports.I have below scenario to achieve.
I have FIND window and MAIN Window.
FIND Window: contains EMPNO, ENAME,and FIND button.
MAIN WINDOW: EMPNO, ENAME, SAL, JOB
If i enter something in FIND window, by clicking FIND button, it will populate data in MAIN window.I have below query in WHEN BUTTON PRESSED TRIGGER.
declare
cursor c1 is select empno, ename, job, sal from emp
where empno=nvl(:FIND.empno,empno)
and ename=nvl(:FIND.ename,ename)
begin
--here i am populating data into MAIN window block
end;
It's working fine.
REQUIREMENT: i want to pass where statement dynamically. Let us say if i pass only empno in FIND window, i want to pass 'WHERE empno=:FIND.empno' to existing select statement [I will keep select statement same without where condition]
If i pass empno and ename both, i want to pass 'WHERE empno=:FIND.empno and ename=:FIND.ename.
How to pass where condition to existing select statement based on parameters we pass in FIND window.
View 8 Replies
View Related
Apr 18, 2013
How to pass data of one procedure to another procedure in oracle forms.
View 1 Replies
View Related
Apr 17, 2012
Is it possible to pass parameters from menu file to form when calling a form from menu item?
View 4 Replies
View Related
Jan 24, 2012
How to pass a values from one to another, but without using parameters or globals. I've used parameters and every time i have to list the values of the form that values have been passed to, it ask do you want to save... even if I didn't passed any values. It's because my code in where-new-form instance, where i give values to a parameters.
View 17 Replies
View Related
Aug 5, 2013
I am trying a pl/sql block which which take a string and execute it dynamically. Suppose below is string
M_COL := Q'[(P_CODE=> ':DEPTNO',P_CODE_TYPE => 'STATE')]';
Now trying to execute it. using below
M_STR := 'SELECT CHK_DEPT' || M_COL || ' FROM EMP WHERE EMPNO=''7499''';
EXECUTE IMMEDIATE M_STR
INTO M_DATE;
Now what i want is M_STR vairable to executed as
SELECT CHK_DEPT(P_CODE=> DEPTNO,P_CODE_TYPE => 'STATE') FROM EMP WHERE EMPNO='7499'
instead of
SELECT CHK_DEPT(P_CODE=> 'DEPTNO',P_CODE_TYPE => 'STATE') FROM EMP WHERE EMPNO='7499'
other in other way in parameter P_CODE Column value of DEPTNO should be passed.Also note that DEPTNO column in string M_COL is Dynamic.i.e
M_COL := Q'[(P_CODE=> ':DEPTID',P_CODE_TYPE => 'STATE')]'; OR
M_COL := Q'[(P_CODE=> ':EMP_ID',P_CODE_TYPE => 'STATE')]';
View 9 Replies
View Related
Jan 5, 2011
can we pass parameter in a link. i.e when we open a new form clicking on the link, some values to be passed to the form so that new form get populated with that value.
View 2 Replies
View Related
Sep 6, 2010
I have a form in which the user selects values above from a LOV and then selects a run query button which then uses the values selected in the LOV to refine the query and output the appropriate values.
What i have done in the pre-query trigger is: (the block i am querying is called cars where the block i am selecting values from the LOV is called selection)
:cars.make := :selection.make; (repeated for other fields)
this worked fine untill i introduced a from and to date in my form in which i passed the data through to the query like this:
declare
v_dates_between varchar2(1000);
begin
v_dates_between := 'reg_date between ''' || :selection.from_date || ''' and ''' || :selection.to_date;
Set_Block_Property( 'cars', DEFAULT_WHERE, v_dates_between ) ;
Now i have added the above bit of code the from and to date work fine, but when a car make is selected it still bring back every car make and not just the one selected.
is it possibly because i am setting the where clause in the block property? perhaps i need to now incoperate my other selections into this where clause? are the two blocks exclusive to eachother? and if i put the whole code into the block property I assume i will get problems. E.G. the user leaves a selection criteria blank (if they want to query all car models they wouldnt select one from the list) i assume the query would only return back values which contain no car model which would be 0 records.
View 6 Replies
View Related
Oct 26, 2013
I have created a Data block - 'CONTACTS' (Database data block) and has database item - 'Code', 'Descr'
The number of records displayed is set to 5.
Value When checked - 'Y'
Value When Unchecked - 'N'
Check box mapping of other values - 'unchecked'
The requirement is when i check one or multiple checkboxes, i should pass the 'Code' item values to the WHERE clause.
Right now whenver i am trying to do so, only the current record value is copied to the WHERE clause.
I have tried using basic loop as well as while loop but things havmt worked. Below is a basic code which will work for one record, request to guide me with muliple checkbox ticked.
IF :contacts.cb = 'Y' THEN
IF p_where is null then
p_where := :contacts.code;
else
p_where := p_where ||','||:contacts.code;
end if;
end if;
p_where:= 'where code in ('||p_where||')';
View 6 Replies
View Related
May 9, 2011
is there a way where i can pass the value from unix to forms?
View 1 Replies
View Related
Oct 20, 2011
I want to create table from query with passing parameters
create table as temp
select * from emp
where hiredate between :sdate and :edate
and deptno = :dpt
when I tried in Toad after passing parameters it gives me error
ORA-01036: illegal variable name/number
View 6 Replies
View Related
Jul 6, 2010
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
PL/SQL Release 11.1.0.6.0 - Production
"CORE 11.1.0.6.0 Production"
I have a form which has few textboxes, and few dropdown, and 3 links. Data is entered in few boxes, and then when a link is clicked, it goes to another page, but i want to pass the text in the text boxes, and the selected value from the dropdown also, to be passed as parameters to this link... But since these values are not yet saved, its not getting passed.. like it is something like this in the address bar add_new_event?&event_ id= &event_ name= & event_dt=
View 1 Replies
View Related
Aug 29, 2012
I have the following query:
select col_1,col_9 from
book_temp b
where b.col_1 is not null
order by to_number(b.col_16)
;
What I want to add is the following:
COL_9
=====
NULL
A
B
NULL
C
D
E
F
NULL
G
I need to connect the NON-NULL rows to the preceding NULL row.
View 15 Replies
View Related
Oct 28, 2011
Version information:
Forms [32 Bit] Version 10.1.2.3.0 (Production)
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
When an user enters a value in a field of a Screen, I want to query up the next screen records based on that user input value in the previous screen.The previous screen is based on a control block i.e.
Q_EMP
items- Q_EMP.emp_id, Q_EMP.FY, Q_EMP.hire_flag.
View 3 Replies
View Related
Jun 21, 2010
I am running a GROUP BY query on a few columns of enumerated data like:
select count(*), Condition, Size
group by Condition, Size;
COUNT(*) CONDITION SIZE
-------- ---------- --------
3 MINT L
2 FAIR L
4 FAIR M
1 MINT S
Well, let's say I also have a timestamp field in the database. I cannot run a group by with that involved because the time is recorded to the milisec and is unique for every record. Instead, I want to include this in my group by function based on whether or not it is NULL.
For example:
COUNT(*) CONDITION SIZE SOLDDATE
-------- ---------- -------- ----------
3 MINT L ISNULL
2 FAIR L NOTNULL
2 FAIR M NOTNULL
2 FAIR M ISNULL
1 MINT S ISNULL
View 9 Replies
View Related
Mar 16, 2011
I have a table which has a not null column. the column is date field. I am trying to change it to Null. But it is giving a error.
I am using below query.
ALTER TABLE T_test
modify (paid_to_date null)
View 9 Replies
View Related
Jan 21, 2010
I have an existing form and report. We recreated our testing environment and now when running any report I first get the following error: REP-3002: Error initializing printer. make sure a printer in installed.
This error pops up when calling RUN_REPORT_OBJECT.
The next line of code checks the report status by using REPORT_OBJECT_STATUS. This check throws out error: FRM-40738: Argument1 to builtin REPORT_OBJECT_STATUS cannot be null.
This indicates that my FIND_REPORT_OBJECT is not returning a value.
All these reports and forms used to work fine on our old testing environment and also works on our live database.
View 4 Replies
View Related
Feb 1, 2012
Is there any way to see items in the block having null in them? I want to figure out null field before inserting the data in the database table. At the moment I am having an error ORA 01400 which means that a NULL cannot be inserted into NOT NULL column. So, I want to create a procedure which will fire before insert trigger of the block and it will show me the names of items having null it them.
Procedure check_data(block_name in varchar2)
First_item varchar(20);
Current_item varchar(20);
Last_item varchar(20);
Begin
[Code]..
The problem is that I don't know the function to get the value inserted by user in the field so that I can compare it in IF condition.
View 3 Replies
View Related
Jan 17, 2012
There is a table, desc :-
name varchar2(10), class number(1)
values:-
name class
----- ------
qwe 1
asd
zxc 2
Here 'asd's class is NULL.
Now, using forms, how do i display the above with the modification where NULL will be shown as -1?
that is-
name class
----- ------
qwe 1
asd -1
zxc 2
View 39 Replies
View Related
Oct 3, 2005
I am calling report9i from forms9i. i am getting following error
invalid report id
when i call a report from form in when button pressed trigger. And also giving the following error
argument(1) can't be null.
v_rep varchar2(100);
v_rep := run_report_object('report5',pl_id);
or
rep_object report_object;
v_rep varchar2(100);
rep_object := find_report('report5');
v_rep := run_report_object(rep_object,pl_id);
where pl_id is the parameter list.
View 34 Replies
View Related
Feb 5, 2011
I have master detail block just consider Forms A as a master and Forms B as a Detail,when my cursor is in form A i try to save the record, it is saved Form A and putting Form B data as null, i have to put a validation to stop this activity, i have to inform the user "Provide values for form B text item",
I created a post block trigger in form A
Begin
If (:FORM-B.TEXT1 is null)l or( :FORM-B.TEXT2 is null)
then
Message( 'provide value for FORM-B');
Message( 'provide value for FORM-B');
raise form_trigger_failure;
ELSE
NULL;
END IF
END;
Im Getting error message and navigation got stopped in last item of form A itself,i need to show error message and cursor control should move to first item of form -B which trigger i have to use for this.
View 1 Replies
View Related
Dec 9, 2011
I am trying to do a simple query where I need to return the rows from a table and treat each rown according to some rules.The query works fine, and returns all the rows, usually I have 2 rows returned. WHen I add to the query where ROWNUM = 1, I get the first row returned, but when I use when ROWNUM =2 OR ROWNUM >1, I always get null rows retured, even if I have rows in the database. Here is my query:
SELECT on_time
INTO on_time2
FROM work.work_unit
WHERE work_code = 1
AND emp_no = :entry_blk.p_emp_no
AND work_date = :entry_blk.p_work_date
WHERE ROWNUM = 2;
--RETURN NULL
I changed it to the following format, but still I get the same results, only I get data when I say when rownum = 1, i get back the first record in the query
SELECT on_time
INTO on_time2
FROM (SELECT on_time
FROM work.work_unit
WHERE work_code = 1
AND emp_no = :entry_blk.p_emp_no
AND work_date = :entry_blk.p_work_date)
WHERE ROWNUM = 2;
I can't move forward in my form until I figure out why this is not returning records
View 4 Replies
View Related
Feb 28, 2012
I'm having a problem with null values. I want to display old student in a display item if subjects text item has records. Otherwise, display new student if it has null values. This is the code that i tried so far..
IF :block2.subjects IS NULL THEN
:block3.type := 'NEW STUDENT';
ELSE
:block3.type := 'OLD STUDENT';
END IF;
But i got logic error during runtime.
View 8 Replies
View Related
Jul 31, 2011
I got below error. I didnot use go_record.FRM-40738: Argument 1 to builtin GO_RECORD cannot be null.
View 1 Replies
View Related
Oct 24, 2013
create table test
(
id int ,
dat date
)
/
I want to implement a business rule such as we have for each id at most 1 dat null. So, I've created this unique index on test.
create unique index x_only_one_dat_cess_null on test(id, case when dat_cess is null then 'NULL' else to_char(dat_cess, 'dd/mm/yyyy') end);
insert into test values (1, sysdate);
insert into test values (1, sysdate - 1);
insert into test values (1, null);
insert into test values (1, null);
-- -----
insert into test values (2, sysdate);
insert into test values (2, sysdate - 1);
insert into test values (2, null);
The 4th insert will cause an error and this is what I wanted to implement. OK. Now the problem is that for non-null values of dat, we can't have data like this
iddat
------------
124/10/2013
123/10/2013
123/10/2013
1
because of the unique index (the 2nd and the 3rd row are equal). So just for learning purposes, how could we allow at most one null value of dat and allow duplicates for non-null values of dat.
View 2 Replies
View Related
Jan 9, 2012
when i follow this steps mention on this website
[URL].........
to modify column from null to not null i got this error and on this website its show successful
my steps are
first i create a table
SQL> create table Stu_Table(Stu_Id varchar(2), Stu_Name varchar(10),
2 Stu_Class varchar(10));
Table created.
Then insert some rows into Stu_Table
SQL> insert into Stu_Table (Stu_Id, Stu_Name) values(1,'Komal');
1 row created.
SQL> insert into Stu_Table (Stu_Id, Stu_Name) values(2,'Ajay');
1 row created.
SQL> insert into Stu_Table (Stu_Id, Stu_Name) values(3,'Rakesh');
1 row created.
SQL> insert into Stu_Table (Stu_Id, Stu_Name) values(4,'Bhanu');
1 row created.
SQL> insert into Stu_Table (Stu_Id, Stu_Name) values(5,'Santosh');
1 row created.
SQL> select * from Stu_Table;
ST STU_NAME STU_CLASS
-- ---------- ----------
1 Komal
2 Ajay
3 Rakesh
4 Bhanu
5 Santosh
Table Structure is like this
SQL> Describe Stu_Table
Name Null? Type
----------------------------------------- -------- ----------------------------
STU_ID VARCHAR2(2)
STU_NAME VARCHAR2(10)
STU_CLASS VARCHAR2(10)
now when i try to modify this Stu_id column to not null its give me error.
SQL>ALTER TABLE Stu_Table MODIFY Stu_Id int(3)not null;
ALTER TABLE Stu_Table MODIFY Stu_Id int(3)not null
*
ERROR at line 1:
ORA-01735: invalid ALTER TABLE option
and when i try to add new column with not null its also gives me error
SQL> ALTER TABLE Stu_Table add C1_TEMP integer NOT NULL;
ALTER TABLE Stu_Table add C1_TEMP integer NOT NULL
*
ERROR at line 1:
ORA-01758: table must be empty to add mandatory (NOT NULL) column
View 6 Replies
View Related
Jul 12, 2012
I have 8 columns. Some of them might be null.I want to display all 8 columns in my result. Not null columns will be first and null at the end.Here is a sample data :
Employee table :
Employee_id Emp_fname emp_lname emp_mname dept salary emp_height emp_weight
1 aaa ddd d1 100 6 180
2 bbb ccc 120 169
3 dfe d2 5.9 223
The expected result is :
result1 result2 result3 result4 result5 result6 result7 result8
1 aaa ddd d1 100 6 180
2 bbb ccc 120 169
3 dfe d2 5.9 223
View 8 Replies
View Related
Oct 25, 2012
Initially i have inserted the data into table like
Date xxx yyyy
1/1/12 1 1
2/1/12 null null
3/1/12 null null
4/1/12 1 1
5/1/12 1 1
6/1/12 null null
in above example data is null for some date here my requirement is how can i copy before not null data(1/1/12) to *2/1/12, 3/1/12* .
View 3 Replies
View Related