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.
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
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
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.
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.
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
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;
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
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.
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
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 :
Suppose that, I have two tables: emp, dept emp records the empid, emp_name, deptid dept records the deptid, dept_name
Here is a record, it's a president or some special position in company, so it's deptid is set to NULL. Here comes the question, how can I print all the emp_name with their deptartment name?
I know how to print all the emp_name with their department name if they have dept_id, but is that possible that I merge the record with dept_id NULL?
I have set up a label which interacts with our LIMS system. I have set up variables on this label which pull in attribute values from the available tokens. When the attribute value is null, the label is automatically inserting 'N/V' onto the label.
I would prefer for the variable to appear as a blank field on the label when the attribute value is null in the LIMS. can't find anything in the user's manual. Perhaps there is some setting where you can define what to display for null values. I can't seem to find any information on this.
SELECT TO_DATE('21-NOV-2010') DAY, 0 RATE FROM DUAL UNION SELECT TO_DATE('22-NOV-2010') DAY, 10.5 RATE FROM DUAL UNION SELECT TO_DATE('23-NOV-2010') DAY, 0 RATE FROM DUAL UNION SELECT TO_DATE('24-NOV-2010') DAY, 0 RATE FROM DUAL UNION
I have a trigger "before update" that change some values, including a timestamp column. My sql code does an update using the "returning clause" to get the values changed by the trigger. The problem is:
When I do an "update [...] returning timestamp_field", this timestamp_field has the old value equals to null (in the trigger). And, this field in the table is not null. This problem not occurs with the others fields of type number, varchar... only with the timestamp field.
Here are the code to simulate this problem:
--Table create table TB_TEST ( ID NUMBER(10) not null, FLAG NUMBER(10) not null, TAG VARCHAR2(16) not null, TS_ATU_DTR TIMESTAMP(9) not null );
"old.TS_ATU_DTR=, " Isn't it right????? Why the other fields aren't null? I need the "old.TS_ATU_DTR" to use in my other trigger to compare timestamps, how can I get it?
MY requirment is: I want the first three nullable attributes. For Eg: If I have 60 columns in table, I need to fetch the first three null data in a row.
I have a trigger "before update" that change some values, including a timestamp column. My sql code does an update using the "returning clause" to get the values changed by the trigger. When I do an "update [...] returning timestamp_field", this timestamp_field has the old value equals to null (in the trigger). And, this field in the table is not null. This problem not occurs with the others fields of type number, varchar... only with the timestamp field.
Here are the code to simulate this problem:
--Table create table TB_TEST ( ID NUMBER(10) not null, FLAG NUMBER(10) not null, TAG VARCHAR2(16) not null, TS_ATU_DTR TIMESTAMP(9) not null ); [code]...
Why the other fields aren't null?I need the "old.TS_ATU_DTR" to use in my other trigger to compare timestamps, how can I get it? I am using Oracle 11.2.0 - Suse Linux.
i have a function which takes in two variables and return a varchar.
ex: Function(var1,var2) return as varchar2.
in the function,i query a table for var1 and var2 and concatenate the result set to return a varchar. But if either var1 or var2 is null,then my query in the function fetches the result set for the other variable.
My question is,how would i pass a null value through the function and handle it in the function.