Client Tools :: Controlling Prompt Based On Previous Parameter

Apr 9, 2013

I need to accept value for some variables using substitution variable. I have a number of variables for which I need to take the value on run time. I need to prompt a parameter based on the value provided earlier.

For example;

There is prompt to enter country. If the user enters country as India it should prompt for the state else it should not prompt for state.

How can this be handled in SQL?

View 3 Replies


ADVERTISEMENT

Client Tools :: SQLPlus Not Starting From Command Prompt

Jan 21, 2011

I am able to start SQLPLUS from Start | Program files | Oracle - OraHome92 | Application development |

Unfortunately, when trying to start it from the "command prompt" window with the following command SQLPLUS, it generates the infamous error message like

"... unknown etc... "

Any variables i need to change on my client machine ?

View 11 Replies View Related

Client Tools :: Ignore Sql Prompt And Command Entered While Spooling?

Oct 24, 2011

Is it possible to ignore the sql command prompt and the command entered while spooling. I tried the to set echo off,term off and some more options but it did not work.

Example:

SQL> spool c: est.log
SQL> Prompt "This is a test"
"This is a test"
SQL> spool off;

The spool file has the following

SQL> Prompt "This is a test"
"This is a test"
SQL> spool off;

Is it possible to set some options so that the spool file only contains output.

"This is a test"

View 3 Replies View Related

Client Tools :: Not Able To Launch Sql Prompt After Entering Username And Password?

Oct 17, 2011

I have installed Oracle 10 galso changed the password of Scott,System users during installation via passwordmanagement. When I am click on sql plus icon to launch sql and entering user name : Scoot pwd :Tiger

It get closed and nothing is coming up.

View 7 Replies View Related

Client Tools :: Execute A Procedure With Parameter Of Object Type?

Mar 29, 2010

I am trying to execute the procedure from toad, where the type is like an object.How can I do that?

CREATE OR REPLACE TYPE list_t AS TABLE OF list_objtype;
CREATE OR REPLACE TYPE list_objtype AS OBJECT
( Emp_ID NUMBER(5),
EMp_Name VARCHAR2(32 BYTE)
);

In the following procedure I am calling list_t, but how would i pass the values to it?

PROCEDURE modify_settings
( p_List in list_t,
p_info out varchar2)
DECLARE
p_List TABLE;

[code]...

View 1 Replies View Related

Client Tools :: How To Pass Ambersand (&) As Input Parameter To A Stored Procedure

Oct 26, 2010

i have a stored procedure whose input parameter is a varchar2 datatype.i created this procedure for an interface and tibco would be calling my procedure by passing input parameters.my problem is when there is a input string with & (ambersand) then its not working.

even i tried to pass the parameter with & in TOAD, it asks me to enter value for string.look at the sample code below which i wrote for testing purpose:

procedure is:

create or replace procedure testproc(p_in in varchar2)
is
begin
null;
end;

i pass parameter as given below:

begin
testproc('abc & def');
end;

if i run above script, it asks me to input some string value as it sees & in the string. attached is the image that shows up in TOAD. if i run below script it works. but i dont know how many &'s will be there in the input parameter. hence i cant do. and also TIBCO cant modify the input paramter while calling the procedure.

begin
testproc('abc &'||'def');
end;

View 9 Replies View Related

Client Tools :: Force Parameter Value To Change Filename For Every Execution Of Sql Script

Jan 24, 2012

I wrote an sql script (spooler) which runs a select query and produces results into a file.

I want to have the filename with the year attached. Can i pass a parameter when i run the script from SQL*PLUS

@'B: Year Of FinancingPLSQLspoolersSpooler_File_Creation' 01/01/2010 2010;

the first parameter 01/01/2010 is passed to the select query and taht works fine.

Since the output file contains 2010 data, I want the spooled file to mention in its name the 2010, so User's can know the file contains 2010 data in it.

So i wrote the statement within the spooler script

SPOOL X:HARSOrganizationsFinancialDataFor&2.txt

&2 should take 2010 has its value and produce the file FinancialDataFor2010.txt

how to use Substitution variables to produce the Filename i want.

View 10 Replies View Related

Reports & Discoverer :: Vertical Expansion Based Upon Info In Previous Column

Mar 19, 2012

I've a 6 column report where col5 is set to expand vertically (based upon comments) and works wonderfully. Col6 is a single character column, therefore does not expand so the report looks rather messy.

I would like col6 to expand in accordance to col5. Is it possible?

View 8 Replies View Related

Client IP Of Previous Transaction

Mar 11, 2013

Is it possible for me as a DBA to find IP address of the client who ran a specific transaction or query in past?

Oracle server version I'm using is 11g.

View 4 Replies View Related

Networking And Gateways :: Controlling Database Access?

Nov 22, 2010

i want to restrict particular ips ,for that i specified

TCP.VALIDNODE_CHECKING= YES
AND
TCP.INVITED_NODES=(IPADDRESS)

in sqlnet.ora file but whenever i connect to database from the particular specified IPADDRESS , the database allows the connection to happen ( doesnot restrict it),

View 1 Replies View Related

Client Tools :: Tools For Load Testing On Oracle - J2EE Application?

Jan 5, 2012

which are recommended Tool for load testing (for performance) on Oracle-J2EE, 3 Tier applications?

Is 'Oracle Application Test Suite' the best for such test where we can simulate numbers of users and their various actions?

Does it come with Oracle Database license or we have to buy it separately?

View 1 Replies View Related

Client Tools :: Basic Tools For Oracle Version Control

Aug 26, 2011

I'm looking for 3 simple things.

1) A reverse engineering tool that I can point to an Oracle schema and get a "baseline" script to re-create that schema from scratch, with decently formatted DDL files (1 per object) neatly organized in a directory tree (by object type) and called in the correct order. Icing on the cake would be an option to pass the tool a list of tables containing static data and get DMLs to populate (insert) those tables as part of the script.

2) a diff tool that I can point to a pair of Oracle instances (source and target) containing a given schema and get a "delta" script to alter the target schema so that it becomes identical to the source schema. If data loss occurs on the target instance (i.e. drop a column) I would like to find a warning comment inserted in the script (e.g. "-- Attention: data migration DML needed here?"). Icing on the cake would be an option to pass the tool a list of tables containing static data and get DMLs to update (delete, update and insert) the data in the target tables to become identical to the contents in the source tables *without* deleting and re-inserting all rows (or dropping, recreating and repopulating the table).

3) I would like the above two tools (that, as you will have recognized, are basic to putting your database design under version control) to be open-source, with a command-line interface and a vibrant community backing them.

View 9 Replies View Related

SQL & PL/SQL :: Different Where Clause Based On In Parameter

Aug 30, 2011

how to use different where caluse based on different in parameter. say I pass 1,2 as parameter if it is 1 then the where condition > 10 else if it is 2 then the where condition <5 the where conditions are placed in cursor for loops.

View 2 Replies View Related

SQL & PL/SQL :: Update Previous Row Based On Next Row And Update Duplicate Record

Mar 6, 2013

create table test1

( ID NUMBER(11)
,MEMBER_NMBR NUMBER(10)
,CODE_NMBR NUMBER(7)
,ROW_EFCTV_DT DATE
,ROW_TRMNTN_DT DATE

[code]....

insert into test1 values (11007,7462,32,'30/sep/2012','31/dec/9999',3,'25/sep/1998','AUTUMN',1,0,344);
insert into test1 values (11007,7462,32,'30/oct/2012','31/dec/9999',3,'25/sep/1998','AUTUMN',1,0,344);
IDMEMBER_NMBRCODE_NMBRROW_EFCTV_DTROW_TRMNTN_DTFLAG_NMBRBRTH_DTNAMECLAIM_CDAMT1AMT2
1100774623209/30/2012 00:0012/31/9999 00:00309/25/1998 00:00AUTUMN10344
1100774623210/30/2012 00:0012/31/9999 00:00309/25/1998 00:00AUTUMN10344

I have to update the row_trmntn_dt of first row to row_efctv_dt of 2nd row which is 30th Oct 2012 - 1 day i.e. 29th Oct 2012

View 10 Replies View Related

SQL & PL/SQL :: Calling A If Block Based On Parameter

Jan 11, 2013

I need to check the condition based what string I am sending. Suppose I am calling with

1.'a,b,c' then it should check all the if blocks.
2.'a,b' then it should check only 'a' and 'b' if blocks.

Is it possible to do so?

DECLARE
a VARCHAR2(5):=0;
b VARCHAR2(5):=0;
c VARCHAR2(5):=0;
PROCEDURE p1(
p_str VARCHAR2)
IS
BEGIN
[code]....... I

View 7 Replies View Related

SQL & PL/SQL :: Order By Based On Input Parameter?

Jun 29, 2011

I have created the Procedure P_GET_CURRENCIES. I want to sort the cursor query based on the Input parameter P_SORT_ORDER. For example if i pass 2 for P_SORT_ORDER then my query should be sorted by 2nd column. But i'm not getting correct Output.

PROCEDURE P_GET_CURRENCIES(P_START_ROW_NUM IN INTEGER
,P_END_ROW_NUM IN INTEGER
,P_SORT_ORDER IN number
,P_CURRENCY_DATA OUT SYS_REFCURSOR
,P_RETURN_MESSAGE OUT VARCHAR2 )
AS

[code]....

View 3 Replies View Related

Client Tools :: Cannot Connect Using JDBC Oracle Thin Client With (New Method)?

Feb 21, 2013

The problem is that this connection errors when I try to connect using my SQuirreL client. My developers want to connecting using the SID or the SERVICE_NAME and by using the "New Method" syntax, not the "Old Method" syntax. According to the documentation the "New Method" syntax works with the SERVICE_NAME or the SID. The "Old Method" only works with the SID.

# Host name is vmwwin7634.na.SAS.com
# SID is sting2
# SERVICE_NAME is sting2.na.sas.com

PROBLEM using SID errors ==> jdbc:oracle:thin:@vmwwin7634.na.SAS.com:1521/sting2
THIS WORKS using SERVICE_NAME ==> jdbc:oracle:thin:@vmwwin7634.na.SAS.com:1521/sting2.na.sas.com

I am using SQuirreL Client version 3.4.0

# Here is the tnsnames.ora entry on the server.
STING2 =
(DESCRIPTION =

[code]...

# In this documentation it says, "On new syntax SERVICE may be a oracle service name or a SID."You can find this on the orafax wiki under JDBC#Thin_driver.

# I was able to connect with the "old method" using the SID only, SERVICE_NAME errors jdbc:oracle:thin:@vmwwin7634.na.SAS.com:1521:sting2.na.sas.com
(SQuirreL client error, "Unexpected Error occurred attempting to open an SQL connection.")
jdbc:oracle:thin:@vmwwin7634.na.SAS.com:1521:sting2 (this works)

# "New Method"
jdbc:oracle:thin:@vmwwin7634.na.SAS.com:1521/sting2.na.sas.com (this works)
jdbc:oracle:thin:@vmwwin7634.na.SAS.com:1521/sting2 (this errors)
(SQuirreL client error, "Unexpected Error occurred attempting to open an SQL connection.")

View 10 Replies View Related

Client Tools :: Can Use Oracle Client Version To Create A Database In That Server

Jan 13, 2011

can we use oracle client version to create a database in that server.

View 3 Replies View Related

Client Tools :: How To Connect From Client To Oracle Database In Unix

Dec 11, 2012

I have new virtual UNIX machine and I installed oracle client on /usr/lib/oracle. Also I have a oracle database and I am able to connect to this database from my desktop sql developer.

So now I am trying to connect from new UNIX machine. Where I created tnsnames.ora file under /usr/lib/oracle/network/admin and before connecting did export the following

export TNS_ADMIN=/usr/lib/oracle/network/admin
export ORACLE_HOME=/usr/lib/oracle/
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=$PATH:$HOME/bin:/sbin:$ORACLE_HOME/bin
export ORACLE_SID=VFIODSD1

when I try

# sqlplus
username :xxxxxxx
password : xxxxxxx

ORA-12545: Connect failed because target host or object does not exist. Not sure what I missed here. using same tns file I am able to connect from sql developer on windows.

View 1 Replies View Related

Client Tools :: Oracle Client 32 Bit On Windows Server 2008 R2 64 Bit

Jul 20, 2012

Can i install Oracle 10g Client 32 bit on our Windows Server 2008 R2 64 bit?

View 1 Replies View Related

Client Tools :: Install Oracle To Get Latest SQL Plus Working On Client PC

Jul 11, 2012

I need to install Oracle client to get latest sql plus working on client pc as the problem is, i am not able to find out where i can download this , i just need the sql plus as i am not able use many commands because when i installed oracle forms 6i client tool , sql plus 8.0 got installed.

View 4 Replies View Related

SQL & PL/SQL :: Filtering SELECT Statement Based On Parameter?

May 26, 2010

Below is the code as currently written which works fine for Delta records processing (based on the field called activ_dt).

/*
Custom extract
Project: XYZ Price Data Extract
Product: EOWin 4.02 - Oracle database
Use : Script to create the above XYZ Extract and spool the results to a text file
Input Parameters:

[code]....

My problem is I am trying to add a 3rd parameter which will tell the extract to pull all of the data or just the deltas. So I added &3 to the comments and I have tried putting CASE or DECODE functions into the WHERE clause with no luck. I also tried to do a CASE or DECODE with two different SELECTS, again with no luck.

An example of my failed attempt to add &3 and handle F or D

/*
Custom extract
Project: XYZ Price Data Extract
Product: EOWin 4.02 - Oracle database
Use : Script to create the above XYZ Extract and spool the results to a text file
Input Parameters:

[code]....

View 16 Replies View Related

SQL & PL/SQL :: Ordering The Result Set Based On Input Parameter

Aug 2, 2013

I need to order the result set with different data types based on the input parameter.

select * from scott.emp sc order by decode('&input_parameter',1,sc.empno,2, sc.ename);

If the input_parameter is equals to 1 then,ordering should be based on EMPNO which is Number data type.
If the input_parameter is equals to 2 then,ordering should be based on ENAME which is Character Data type.

Above query was failed for input_parameter 2,as we know that decode should return same data type.

View 6 Replies View Related

SQL & PL/SQL :: Setting Variable In Procedure Based On Parameter?

May 24, 2011

I am reading in a selection of parameters. I have created a new variable which I want to set according to the value of one of the input parameters.

I am doing this straight after declaring the variable, but before the cursors and BEGIN statement It is throwing an error when I do this - but I have to do it before the cursors.the variable I am setting is: v_fptransType you can see the IF statement towards the end of the code.

the error I am getting is:Error(28,3): PLS-00103: Encountered the symbol "IF" when expecting one of the following: begin function package pragma procedure subtype type use <an identifier> <a double-quoted delimited-identifier> form current cursor The symbol "begin" was substituted for "IF" to continue.

beginning of the

create or replace
PROCEDURE "P_GLPOST" (i_entity IN varchar2, i_transType IN varchar2, i_startDate IN VARCHAR2,
i_endDate IN VARCHAR2, i_accountPeriod IN VARCHAR2, i_includeInternals IN NUMBER, i_chargeable IN NUMBER, i_trialPost IN NUMBER,
i_postingReport IN NUMBER, TESTER IN VARCHAR2) is
--set serveroutput on size 1000000;

[code].....

View 8 Replies View Related

PL/SQL :: Change Table Name Dynamically Based On Parameter

May 10, 2013

I am new to PL/SQL, worked mostly on SQL server, I have to change the table name dynamically based on the parameter.and used a ref_cursor to display the results in a report. when I execute it throws me an error.

create or replace procedure test1 (
p_eod_date IN VARCHAR2,
p_link IN NUMBER,
c_rec IN OUT SYS_REFCURSOR)
[code]....

View 10 Replies View Related

Client Tools :: BR*Tools Appearance Not Complete

Jan 16, 2013

I want to use BR*Tools to administer an Oracle database. I have installed BrGUI local, set the JAVA Home variable and edited the brgui.properties file accordingly.I am able to login, but the menues are mising. The login screen is incomplete.

View 5 Replies View Related

Client Tools :: Command Line Tools

Jan 22, 2011

I usually work in oracle using the different editors like toad, plsql developer etc. I felt command line is good utility because of various supporting points. I am not sure what kind of command line tools is available/used. I am using pretty straight command line
(run->cmd, then enter username and password).

The best command line tools available. What is generally used command line tools.

View 1 Replies View Related

Client Tools :: ODBC Instant Client Oracle 10g

Jun 28, 2010

The version is Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi. for Unix AIX 5

I install the ODBC Driver Manager, Basic Instant Client, ODBC Instant Client packages (libsqora.so, odbc_update_ini.sh).

The error:

[oracle@d4 oracle] $ isql OracleODBC-10g user passtemp -v
[01000][unixODBC][Driver Manager]Can't open lib '/home/oracle/instantclient_10_2/libsqora.so' : file not found
[ISQL]ERROR: Could not SQLConnect

Configuration

odbcinst.ini
[Oracle10gODBCdriver]
Description = Oracle ODBC driver for Oracle 10g
Driver = /u01/app/oracle/product/10.2.0/db_1/lib/libsqora.so
Setup =
FileUsage =
CPTimeout =
CPReuse =

The documentation explic with exists the file libsqora.so.10.1 but not exists in the ODBC Instant Client packages.

I applied ln -s libsqora.so.10.1 libsqora.so but the connection not function

odbc.ini
[oradns]
Application Attributes=T
Attributes=W
BatchAutocommitMode=IfAllSuccessful
CloseCursor=T
[code].......

View 1 Replies View Related

SQL & PL/SQL :: Convert As Procedure Based On Input Date Parameter

Dec 12, 2012

i have the below query

select to_char(report_date, 'YYYY MM Mon'), count(1) no_of_times
from (
select to_date('&&YYYYMMDD', 'YYYYMMDD')+rownum report_date
, mod(rownum,14) mod_result
from all_objects

[code]...

need to convert as procedure based on input date parameter.I will pass the input date from java environment and need to see the sql query output in front end.

View 7 Replies View Related

SQL & PL/SQL :: Column Access In Table Based On User Parameter Input

Nov 10, 2010

Need to access data in a table base on user parameter input where the data is stored like a spreadsheet with column headings JAN, FEB, MAR... and the rows are the years. Is there a way to create a generic SQL statement so that I don't have to have 12 if statements in the procedure?

View 5 Replies View Related







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