Windows :: How To Pass Null Values In OracleCommand As Parameters

Jul 19, 2012

How to pass null values in OracleCommand as a parameters

i am doing like this

((OracleCommand)cmdMySql).Parameters.Add(":1" ,Varchar2).Value = DBNull.Value;

Its giving error when dataadapter is going to fill.

View 3 Replies


ADVERTISEMENT

SQL & PL/SQL :: How To Pass Timestamp Parameters

Sep 13, 2013

In my task I am trying to pass a timestamp datatype as one of the input parameter to a procedure in the package.But I am not sure how to give data for it while executing and testing it from anonymous block.

CREATE OR REPLACE
PACKAGE body ac
IS
PROCEDURE ac_ex_wbdb_keycats(
In_Sale_Location_Id IN NUMBER,
In_Start_Datatime IN TIMESTAMP,
In_Stop_Datatime IN TIMESTAMP,
v_refcur OUT sys_refcursor)

[code]....

View 2 Replies View Related

Forms :: How To Pass Menu Parameters In 10g

Aug 5, 2013

I'm migrating forms 6i to forms 10g. I have a mune which has parameters ,which are working in forms 6i. But when i try to comile in forms 10g its poping up error's.

View 3 Replies View Related

Pass The Parameters And Run The Nohup Command?

Mar 30, 2012

I had a requirement to execute a long running sql query. But the sql query had some parameters to be passed in and at some places i need to press "Enter" . I want to use nohup command and run the sql script using shell script concept. How can i pass the parameters and run the nohup command.

[URL]

I want to keep the sql script in a shell script and run it through nohup command.

how can i keep the above sql in a shell script and run through nohup command

View 1 Replies View Related

PL/SQL :: How To Pass Changeable Actual Parameters Into Procedure

Mar 29, 2013

I am writing a procedure for the front-end. The end-users need to insert multiple rows of data into history tables in the database (11G). My problem is: the multiple actually parameters is not a fix amount, this time, the amount could be 5, next time, it could be 12. I currently used one string and pass the actual parameter (P_id, number) as '2, 4, 5, 7, 8', the procedure was executed successfully, but cannot insert any data into history table.

See my procedure below (the base table has clob data, I have to consider insert ... select *), I tried to use to_number (CONTACT_MSG_ID), it doesn't work well:

PROCEDURE ARCHIVE_XREF_CONT_EMAIL(P_ID IN VARCHAR2) IS
BEGIN
INSERT INTO TRC_XREF_CONT_EMAIL_MSGS_HIST
SELECT *
FROM TRC_XREF_CONT_EMAIL_MSGS
[code].......

View 10 Replies View Related

Reports & Discoverer :: Pass Parameters In Table Section?

May 31, 2012

I have a problem here.Normally, we use &p_where inside a sql script in condition sectione.g :
select name from member where name like 'a%' &p_where order by name;

may i use this kind of parameter in table section?e.g :
select name from &p_table where name like 'a%' and status = 'a' order by name;

the reason i need to do is there are 2 different server. but i need retrieve same info.server ABC have table A but don't have table B and server DEF have table B but don't have table A.

Is there any other method to solve this problem?

View 4 Replies View Related

Client Tools :: Pass Parameters To Oracle SQL Query?

Oct 9, 2012

I am trying to pass the parameters to query and I need to pass few parameters to query. Can I make it like like then I run it, then it come up and ask the parameter like this:

SQL> @text
para1 XXXXX
para2 XXXXX

And then the result of query will come up. I would like to put label for each parameter( likepara1).

View 11 Replies View Related

SQL & PL/SQL :: Collections Fetch - Pass List As Input Parameters To Procedure

May 11, 2012

I have a record type and table of records as follows

type rec is record
(
empid employee.empid%type,
ename employee.ename%type
);

type tab_rec is table of rec;

Suppose data from employee table is fetched into this collection

Can you pls clarify if we can refer to all the rows of empid in the above collection ?

something like tab_rec.empid without using the subscript for referring to the nth row

My requirement isto pass this list as input parameters to a procedure(PL/SQL).

View 3 Replies View Related

Function With Null Parameters

Mar 17, 2009

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.

View 1 Replies View Related

JDeveloper, Java & XML :: Pass Null As Argument In Any Method Parameter?

Feb 23, 2013

why we pass null as a argument in any method parameter....What is its use in method reference..

View 1 Replies View Related

Application Express :: URL Parameters Null

Mar 11, 2013

I have a HTML region with two select lists and one button. The select lists are P103_SPORT and P103_YEAR. I want the user to make choices from the select lists and click the button to pass their choices as parameters in a URL. I set the button to redirect to a URL. In that URL I am using the notation &P103_SPORT. and &P103_YEAR. to include the user values. Currently when a user clicks the button, a new window opens with the URL, but nulls are being passed for the 2 items (sport and year). When I click the DEBUG button for the page, these items have nulls for values, even though the user selects values from the select list.

what I'm missing here? Why does DEBUG show null for the items when I can see values in these items?

View 3 Replies View Related

Replacing Null Values Of Outer Join With Meaningful Values

Dec 3, 2010

I have a scenario where I have to get all the available dates of a resource. I am using the below query to get it.

Select Avail_Date AS MONTH
, Resource_Id
FROM res_tsk
, (SELECT Rownum - 1 + TRUNC (sysdate) avail_date
FROM Dual
[code].......

The result of this is:

Month Dates Resource_ID
12/3/10 0:00 NULL
12/4/10 0:00 NULL
12/5/10 0:00 NULL
12/6/10 0:00 100033868

As I am doing a outer join, if the resource is not available on a particular day the resource_id is coming as NULL as it is not available. Is there any way to populate this NULL resource_id with the original resource_id as the resource_id is same for all the result set.

I need the output to be

Month Dates Resource_ID
12/3/10 0:00 100033868
12/4/10 0:00 100033868
12/5/10 0:00 100033868
12/6/10 0:00 100033868

View 3 Replies View Related

Windows :: How To Pass Date Time From PL To BAL / DAL To Database

Apr 24, 2013

1) how to pass date from .net using odp.net to oracle database for storage. so that it should not be affected if any one changes os(windows xp or 2003 /2008 server) date formate.

database and application both are on different server and can be on same server also. so if any one keeps different date formate on both OS then it should not get affected.

View 1 Replies View Related

Values In User Pass To Be In Encrypted Form

Apr 1, 2009

I have a table in my oracle database named user_details in which i have two fields

a) username varchar(30),
b) userpass varchar(30)

i have inserted some data in it

i want my values in user pass to be in encrypted form .

View 1 Replies View Related

SQL & PL/SQL :: How To Pass Shell Script Values To Procedure

May 30, 2012

I have one procedure , which calls the DBMS_scheduler.run_job , which calls the Shell Script. now based on the shell execution i need to return the message lines to procedure.

View 1 Replies View Related

ODP.NET :: InvalidOperationException Thrown When Execute OracleCommand.ExecuteNonQuery

Sep 7, 2012

I have encountered an problem when I execute this code, which delete a record from Oracle DB. However, it doesn't happen when execute other SQL statements like "Select ", "Update". I am not sure whether this problem will happen on Microsoft SQL Server database. test this code below, and deal with this InvalidOperationException problem.

private void btnDelete_Click(object sender, EventArgs e)
{
string oradb = "Data Source=localhost;User Id=system;Password=admin;";
OracleConnection conn = new OracleConnection(oradb);
int recordAffected;
// Delete an existing record

[code]....

View 2 Replies View Related

How To Pass Values From Bash Shell Script To Sqlplus

May 3, 2012

I want to run parallel queries of 16 sqlplus jobs through shell script.i don't know to pass values dynamically from shell script to sqlplus.

here i am hard coded the values but i want to pass the values dynamically. and how i will know each job is running successfully.if any job is fail the it will exit from script.

my shell script is :

sqlplus -s username/password @script_file.sql 1001 1004 &
sqlplus -s username/password @script_file.sql 1006 1010 &
sqlplus -s username/password @script_file.sql 1011 1015 &
sqlplus -s username/password @script_file.sql 1016 1025 &

my sql file is:

CLEAR BUFFER
SET SQLBLANKLINES ON
SET ECHO OFF
SET FEEDBACK OFF
SET FLUSH OFF
SET HEADING OFF
[code]........

View 1 Replies View Related

PL/SQL :: Unable To Pass Comma Separated Values For In Clause

Apr 24, 2013

I have the following query : for :P_LEG_NUM Parameter when i am passing values like 1,2,5 as string type i am getting invalid number error... I have defined in clause for it but still it does not work.. For individual values like 2, etc it works... how can i pass comma separated values for this bind variable

select trip_number as prl_trip_number,
flight_number as prl_f_number,
trip_leg_id as prl_trip_leg_id,
leg_number as prl_leg_num,
dicao as prl_dicao,
[code]........      

View 2 Replies View Related

PL/SQL :: How To Pass List Of Values In Where Clause Of Query Parameter

Sep 18, 2012

I need to get multiple code values and put it into a variable which later need to pass into the where clause of an sql. But i am not getting any results even i pass those values in the variable of an where clause: below is my Procedure:

declare
TYPE crMain_record is RECORD (
v_code             dummy.v_code%type,
n_no               dummy.n_no%type,

[Code].....

END;"lv_character" is going to hold the multiple code values which i need to pass into whare clause of the above SQL: the totlal number of these mulitipe codes can be more then 50..

And lv_character values are commung from a setup table
lv_character varchar2(32767):= '('||''''||'COMMIS'||''''||' , '||''''||'AGY BUILDING BENS'||''''||')';
--And lv_character values are commung from a setup table.where "lv_character" holdes multipe code values...
And lv_character values are commung from a setup table and upper(d.v_code)in lv_characterif the

View 3 Replies View Related

Pass Variables For UserID And Password To Sqlplus In Windows From Text File?

Jul 23, 2013

I would like to store user-id, password and the TNS-Entry in a small text file and pass them to a script to log in and execute another script on the database from Windows.

Example of the text file samp.txt that stores user info:

username=Jdoe
password=candybar
db_sid:orcl

main script main.bat is as follows:

--read the samp.txt do not know how to do it

sqlplus -s &username/&password@&db_sid @db_info.sql

db_info.sql contents:

column tm new_value file_time noprint
select to_char(sysdate, 'YYYYMMDD') tm from dual ;
spool C:\server\DB_Report_&file_time..log
select * from v$instance;
spool off;
exit

View 1 Replies View Related

JDeveloper, Java & XML :: Get Values With Two Columns And Pass It To Informatica To Frame

Aug 29, 2011

I have a scenario to frame an xml as below, below i have given a sample data

Create table xml_type
(msg varchar2(1000),
desp varchar2(1000),
val number) ;

[Code]....

Actually i need the output as below, i tried and succeeded doing it in Procedure , but they are asking me to do it in SQL query. How to get from an sql query.

<DETAIL>
<ERROR> 'Invalid Name ID' </ERROR>
<ID> 'Name ID' </ID>
<VALUE> 6 </VALUE>
<VALUE> 7 </VALUE>
<VALUE> 8 </VALUE>
</DETAIL>

[Code]...

Or i was planning to get the values as below with two columns and pass it to informatica to frame the XML.

Col1 Col2
Invalid Name Id Error
Name ID ID
6 Value
7 Value
8 Value
Invalid FAQ ID Error
FAQ Id ID
9 Value
10 Value

Let me know the best option and how to do this task.

View 1 Replies View Related

SQL & PL/SQL :: Pass Multiple Values As Single Input Parameter Into Pipeline Function

Dec 23, 2012

My need is to pass multiple values as single input parameter into pipelined function. For example - "2" and "3" are values of input parameter "t":

with data as (
select 1 as t from dual union all
select 2 as t from dual union all
select 3 as t from dual union all
select 4 as t from dual union all
select 5 as t from dual
)
select * from data where t in (2,3)

View 2 Replies View Related

Deprecated System Parameters With Specified Values

Apr 22, 2013

I am getting below in alert log:

Deprecated system parameters with specified values:
remote_os_authent

IS this parameter is supportable in 11G and also how can i remove it from SP file with out bouncing the instance.

View 1 Replies View Related

SQL & PL/SQL :: Checking Values Of Procedure Parameters

Jan 19, 2013

CREATE TABLE t2
(
id NUMBER,
ename2 VARCHAR2(20),
sal2 NUMBER,
job2 VARCHAR2(20),
conid NUMBER

[Code]...

My requirement is like when I am calling the procedure P1 with some values then it should check the table "t2".And table "t2" is linking with table "t3".

So what ever the column "verify" is there, it should check the incoming values against it. If matches success otherwise reject it.Later the incoming values is stored different tables.I am doing it in the above way by hard coding some value.

BEGIN
p1(1,'MILLER',500,'ADMIN'); --REJECT
p1(1,'MILLER',5000,'ADMIN'); --ACCEPT
P1(2,'MILLER',5000,'SALESMAN');--ACCEPT
END;

View 5 Replies View Related

Select Into With Null Values?

Apr 20, 2007

i have a stored proc where i am selecting a value into a variable like so:

SELECT FUNCTION
INTO V_FUNCTION
FROM FUNCTION_TABLE
WHERE FUNCTION = P_INPUT;

Now, my problem lies in where there is no value returned (oracle will throw an error).

View 3 Replies View Related

Handling NULL Values?

Jan 23, 2013

I have 2 tables, AFF_TEMP and COUNTY
AFF_TEMP has the following columns FNAME, LNAME, EMAIL and COUNTY
COUNTY has 2 columns COUNTY_ID and CNAME

Both tables have the following test data
AFF_TEMP
Joe, Bloggs, joe@gmail.com, ''
Ann, Bloggs, anne@gmail.com,Donegal

and COUNTY column in AFF_TEMP can contain a NULL value

County table has the following Test data,
1, Dublin
2, Donegal
3, Tipperary,
4, Galway

I am trying to select the following from both tables FNAME, LNAME, EMAIL, COUNTY_ID.Tried the following queries
select a.FNAME, a.LNAME,a.EMAIL, C.COUNTY_ID FROM temp_aff A LEFT OUTER JOIN COUNTY C ON A.COUNTY=C.CNAME
OR (A.COUNTY IS NULL)
select a.FNAME, a.LNAME,a.EMAIL, C.COUNTY_ID FROM temp_aff A, COUNTY C
WHERE C.CNAME IN (SELECT UPPER(A.COUNTY) FROM TEMP_AFF A)

[code]...

View 3 Replies View Related

Replacing Null Values

Apr 23, 2010

Is there a way to replace a field with another if the particular value returned is null?

View 11 Replies View Related

SQL & PL/SQL :: Columns With NULL Values?

Dec 17, 2010

We are working on a migration project and we need to move 75 million rows from source system to target system.

Total number of columns in source system - 90 cols.

Out of the 90 columns 10 cols are system fields and rest 80 are properties for each record.

We are required to migrate all system cols and some required properties. In total we will migrate around 25 columns[10+15] for each record.

Before actaul migration , we need to do a data cleansing activity and hence we move the data to a staging table.

To create the staging table, we considered the below appraoches.

1. Create the staging table with around 30 coloumns so as to fit the data from source system[map the columns based on datatype]

2.Create the staging table with actual columns[90 columns] and import only the required properties. The rest all columns will remain NULL.

Do the data cleansing and move to target system.

My question here is, if we go with approach 2, We will not mix the data, as there will be a one-to-one mapping. But many columns will not have data and remain NULL. Will it affect the performance since we deal with 75 million rows.

View 3 Replies View Related

SQL & PL/SQL :: Replace Zero With Null Values

Jul 28, 2010

I have a table abc with two column (marks,id) both can have any value.

Value of the id column is zero at several places.When I divide marks by id. I get divide by zero error.

how to replace zero with null.

View 22 Replies View Related

PL/SQL :: How To Restrict Null Values

Jul 20, 2012

I have main query..And i written a Query for Issued Quantity. The query is retrieving exact data. And when i add the Query in main query the data is coming with extra null values.

for ex. Query for Issued Qty fetch 16 records. and i run the main query it fetch 20 records...there r 4 records which issued Qty is null. How can i restrict that records.

View 14 Replies View Related







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