Correct SQL Language For Oracle / Toad

Jan 30, 2012

My colleague sent me a sql script to copy and execute in Toad for Data Analysts (see attached). Once I execute I get error messages on the date and a few other lines. My question is should I completely rewrite the script?

I would rather have this in a grid format anyway with the same data instead of how this script is pulling. I'm very green when it comes to this (if you didn't notice) and need some insight esp. on the date format considering the date column has 10 digits i.e. 1209105576.

Attached File(s)

Doc1__1_.doc ( 41K )
Number of downloads: 2

View 1 Replies


ADVERTISEMENT

SQL & PL/SQL :: Retrieve HTML Using Oracle And Setting Correct User Agent

Jan 24, 2013

i need to retrieve html using oracle and setting the correct user agent.I used the ut_http package and his fuction utl_http.request_pages.

I worked perfectly for me, execpt that i could be able to setup the correct user-agent.I read the documentation and i found that this instruction utl_http.set_header(req, 'User-Agent', 'Mozilla/4.0'); should fix my problem, but when i used it, nothing changed and the webserver didn't recognize the correct user agent.

I post downhere a piece of the pl-sql procedure i made (it seems that i could find the correct "link" between utl_http.set_header instruction and utl_http.request_pieces instruction)

while(ng < nmax)
loop
ch_in:=p_mese_elab||'-'||ng;
url:=url to retrieve;
req := UTL_HTTP.BEGIN_REQUEST(url);
UTL_HTTP.SET_HEADER(req, 'User-Agent', 'Mozilla/4.0');
resp := UTL_HTTP.GET_RESPONSE(req);
RISULTATO:=utl_http.request_pieces(url,99999);
delete temp_esamina
where data_ril = trunc(to_date(ch_in,'yyyy-mm-dd'));
[code]...

View 11 Replies View Related

SQL & PL/SQL :: Oracle Procedure With C Language

Apr 16, 2010

My question is--> Is it possible to create procedure with embeded C code ?

View 10 Replies View Related

Server Administration :: Language In Oracle 10g

Jul 16, 2013

I have an Oracle DB's charset configured for Korean language and things in there are English and Korean and they are working fine. If i try to import a txt file with Chinese characters into the DB. It doesn't show correctly on query.

Is there any way I can solve this ? Since I find that there are many charset / NLS language options througout DB. I read from others that they have the following response. Any alternative beside changing the whole DB charset ?

Recreate the database with the correct character set
Convert the database to AL32UTF8. Documentation link
Change the databases National Character Set to AL32UTF8 & change your application to use NVARCHAR2()/NCHAR() datatypes instead of VARCHAR2() (documented at the same link as above)

View 5 Replies View Related

SQL & PL/SQL :: Change Oracle Database Language?

Feb 4, 2011

how can i change my oracle database language

View 6 Replies View Related

How To Connect To Oracle To Retrieve Data Using SQL Language

Jan 9, 2012

how to connect to Oracle to retrieve data using SQL language. I've started with a new company which is pretty much a sink or swim type of environment meaning you're an idiot if you don't figure it out on your own. I was told that we use Toad for Oracle 10g. I was given a server name; location and an .ora file named tnsnames that was given to me but I have no clue what to do with. I've come from companies where this was already setup. You just go into access to retrieve the data.

II have totally hit a brick wall with all the other roadblocks I encounter and all researched out. Where I can get step by step instructions on how to connect to start sql in Toad/Oracle?

View 5 Replies View Related

SQL & PL/SQL :: Unable To Insert Hindi Language Characters In Oracle 9i

Apr 17, 2013

I am unable to insert string of Hindi language characters with 1800 character length in column having data type VARCHAR2(4000).

I am getting error "ORA-01461: Can bind LONG value only for insert into a LONG column"

NLS parameters for database are :

PARAMETERVALUE
NLS_LANGUAGEAMERICAN
NLS_TERRITORYAMERICA

[Code]....

Is there any way to insert this string in VARCHAR2 column? I can't change data type to CLOB (with which I able to insert this string).

View 1 Replies View Related

Globalization :: How To Store India Regional Language In Oracle Database

Mar 5, 2013

How can we store data in Indian regional languages in Oracle database. We are using Oracle 10g.

Also i need to know can we convert existing data in oracle to local language ?

View 2 Replies View Related

Application Express :: How To Change Language Of Version (integrated With Oracle Database 11g XE)

Apr 4, 2013

I downloaded Oracle Database 11g Express Edition R2 to test Apex (I've never used). I want to know how to change the language of the version of Apex (integrated with Oracle Database 11g XE)? I would apex in French.

View 7 Replies View Related

Best Way To Change Language Of Windows Oracle Client Machine Edit Registry

Jun 29, 2012

We have installed oracle client on Windows machine and despite selecting language as English

when look in registry shows NLS_LANG as

AMERICAN_AMERICA.WE8MSWIN1252.

What is the best way to change language of Windows oracle client machine edit registry.

View 2 Replies View Related

Server Administration :: Write Bangla Language In Oracle 10gR1 / 10gR2 And Express

May 17, 2012

I tried more to write Bangla in Oracle 10gR1, or 10gR2 or Express but failed. When I write bangla in the "emp_name" field for employee name this can be save, But when I execute to see the data again then the data comes with a big change like some symbol for some character.

View 3 Replies View Related

Unable To Connect To Oracle 10g Through TOAD

Jul 28, 2010

I have installed Oracle 10g XE in my laptop having Windows 7 home 64 bit OS..I have created some users in the oracle and iam able to connect these users through cmd prompt..But the issue is that iam unable to connect to the database through TOAD..

I have given the user name and password and database as XE and connect using as : XE but still iam getting the error as "TNS could not resolve the connect identifier (XE).

View 12 Replies View Related

Unable To Connect In TOAD In ORACLE 11g

Jan 4, 2011

Unable to connect in TOAD in ORACLE 11g through sys user.

I am using Toad for ORACLE version 9.0.0.160 and ORACLE 11gR2 (11.2.0.1).

I make the FALSE to "sec_case_sensitive_logon" parameter hence not able to login through sys user. I can logged in through system user without any issue.

View 4 Replies View Related

RAC & Failsafe :: Oracle 10g TAF Fails For TOAD

Oct 8, 2011

We are into pre-production stage for Oracle RAC implementation. I have setup Oracle 10g 2 node RAC, currently i have been experiencing TAF failures for TOAD client. TOAD client session simply disconnects rather than failing over to the next node, It is noticed that TAF succesfully works for SQL client from the same client machine. Attached herewith are following from both nodes :

1) Listener file node1, node2
2) TNS file node1, node2
3) TNS file client
4) Output of show parameter listener from node1, node2
5) Output of lsnrctl services node1, node2

Summary of environment :

OS - Windows 2003 entp edition sp2, 32 bit
Database server - 10.2.0.5.0

View 2 Replies View Related

Client Tools :: TOAD Not Finding Oracle 11g?

Jul 2, 2013

I am running TOAD 10.6 on Windows 7 (64-bit). I have two 64-bit Oracle 11g clients installed (all on the same machine). The first is Instant Client (client_1); the second is the Runtime client (client_2). The installation of Instant Client was a mistake, since it doesn't have a Network / Admin folder to drop a tnsnames.ora file into. The Runtime client is my desired client, which has the aforementioned folder that I subsequently dropped the file into.

On starting TOAD, it says that "No valid Oracle Client found. Please note that Toad only supports 32 bit Oracle Client installations". (This is odd, since my colleague is running the same Oracle Runtime client as me and has TOAD 11.6, and yet his is working fine. But, this is aside the point.) When, I click on the ellipsis button next to the "Connecting Using" field, TOAD says that I don't have any Oracle homes installed. I checked my registry key (via regedit) under Computer / HKEY_LOCAL_MACHINE / SOFTWARE / ORACLE. It looks like I have 2 Oracle homes (because of the 2 clients).

Also, I right-clicked on My Computer and brought up Properties, Advanced system settings, Environment Variables (on the Advanced tab). My PATH variable has both of my clients.

How to make my available clients (particularly, my client_2) show up in TOAD?

Here is what I have tried thus far:

-Alter the PATH variable to just have client_2. This didn't do anything.

-Try to uninstall client_1 and client_2 via:

a) There is a Universal Installer under Oracle Installation Products in my Runtime client. I do Deinstall Products, click on any of my Oracle homes, click on Remove, and a Warning window pops up saying to run a command at some location, but the location is truncated since I can't expand the window.

b) In my client_2, there is a deinstall Windows Batch File in the deinstall folder. When I run this, the command window sits there for a little bit, saying that some files were copied and that 1 directory was removed. It then closes on its own. This doesn't seem to do anything.

View 1 Replies View Related

Client Tools :: TOAD 8.6 And Oracle 10g - Cannot Connect?

Feb 22, 2012

I have TOAD 8.6 installed and hoping to use with Oracle 10g databases. I have SQL Navigator also - it works fine. However TOAD does not. Open up TOAD and see the TNS dropdown, select a database and try to log in - click on Connect and the little SQL hour glass comes on, goes off - there is no error, no message and no connection. I have tried several databases and again, SQLPlus, SQL Navigator are both working fine.

View 2 Replies View Related

Client Tools :: Unable To Connect To Oracle From Toad

Jul 28, 2010

I installed Oracle 10g XE and Toad 10.5 in my home system.I am able to connect to Oracle from Oracle XE homepage and XE SQL command line but when I try to connect to Oracle from toad 10.5 I am getting the error 'TNS: could not resolve the connect identifier specified (XE)'.From toad I tried direct and TNS options but it did not work. My tns ora file looks like below.

XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = Anu-PC)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)

TNS_ADMIN variable has correct parameter and Toad is directing the correct TNS file. I tried changing hostname with my system's ip but still I am unable to connect to Oracle from Toad.

View 18 Replies View Related

Client Tools :: Oracle Toad 8.6 Install In Window 7?

Apr 25, 2010

I am try to install the oracle toad 8.6 in oracle 11g 32bit for window 7 operating system.

- the install oracle toad completed, but trying to connection to the database, unable to connect, nothing error when trying to connect.

-is oracle toad 8.6 support to window 7? any version for oracle toad to support window 7.

View 8 Replies View Related

Import Data From Excel To Oracle Table Using Toad

Dec 26, 2012

how to import data from Excel sheet (inside server) to oracle DB.

Explanation : I need to automate this work, whenever i get an excel sheets with table values, i need to import the table values in to oracle DB automatically.I need an immediate solution for this.

View 4 Replies View Related

Connecting To DB Remotely Through Toad Using Oracle Instant Client?

May 5, 2013

trying to connect to DB remotely through Toad..

"instantclient" already downloaded and configured as below :

dll files like "oci.dll,... etc" are here : C:Oracleinstantclientinstantclient_11_2
Created both tnsnames.ora & listener.ora are here : C:Oracleinstantclient
etworkadmin

And did the below in user/system variables :

User Variables :
=========
TNS_ADMIN with value "C:Oracleinstantclient
etworkadmin"

System Variables :
===========
TNS_ADMIN with value "C:Oracleinstantclient
etworkadmin"
ORACLE_HOME with value "C:Oracleinstantclient"
Path edited and added this value "C:Oracleinstantclientinstantclient_11_2"

But i am still facing the below error :

ORA-12541: TNS:no listener

View 21 Replies View Related

Client Tools :: Comparison Of Toad And Oracle Enterprise Manager?

Feb 12, 2013

comparison of oracle and toad products.I know we have oracle enterprise manager for doing application and enterprise management.I am listing the tools from toad

Can list the tools from oracle which have or perform the same functionality.

Toad
Toad Development Suite for Oracle
Toad DBA Suite for Oracle
Toad for SQL Server Professional Edition
Toad for SQL Server Xpert Edition
Toad Data Point Pro Edition
Toad Data Point Pro Edition- with analytics

[code]....

View 10 Replies View Related

Client Tools :: Does Toad 8.5 Work With Oracle 10gr Database

Jul 7, 2010

We plan to migrate the databases to Oracle 10gR2 from Oracle 9i. know whether Toad 8.5 works fine with Oracle 10gR2 or not?

View 4 Replies View Related

Client Tools :: Connect With Sqlplus Or Toad - Unable To Initialize Oracle Call Interface

Sep 6, 2012

when i try to connect with sqlplus or toad then i get an error

Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:Users>sqlplus
SP2-1503: Unable to initialize Oracle call interface
SP2-0152: ORACLE may not be functioning properly
C:Users>

and i want to tell what i do before it-my all files were be converted in .FLT then i shorted out this problem after that when i tried to connect with sqlplus or toad then i get above error.and i have restarted my system but throwing same error.

i am using oracle 11.2.0.1 on windows 7

View 5 Replies View Related

SQL & PL/SQL :: How To Select Correct Record

Sep 17, 2013

I have a table of below structure:

CREATE TABLE Emp_addrs
(
EMP_ID NUMBER(15) NOT NULL,
ADDRESS_ID NUMBER(15) NOT NULL,
SITE_USE_ID NUMBER(15) NOT NULL,
SITE_USE_STATUS VARCHAR2(1 BYTE) NOT NULL,
SITE_USE_CODE VARCHAR2(30 BYTE) NOT NULL)

Insert Script code :

insert into Emp_addrs values ( '1207' , '1846', '2342','A');
insert into Emp_addrs values ( '1207' , '1846', '2343','I');
insert into Emp_addrs values ( '61618' , '165200', '261449','A');

[Code]...

A combination of emp_id & address_id can have multiple site_use_id's. I want to select the max(site_use_id) where site_use_status ='A'.
Now Site_use_status can have either = 'I' or 'A' value.

For a combination of emp_id and address_id , there could be cases when there is no record with site_use_status ='A'. In such cases I need to select the max(site_use_id) (and obviously site_use_status ='I').

Just to clear my requirements, out of the above records I want the following records:

'1207' , '1846', '2342','A'
'61618' , '165200', '261449','A'
'1003' , '1004', '1007','A'
'1005' , '1010', '2002','I'
'2005' , '2010', '3002','A'

View 9 Replies View Related

SQL & PL/SQL :: How To Get Correct Minute Between Two Hours

Oct 22, 2012

i am using one query but not getting correct minutes.

here is my query:

v_Interval:= to_timestamp(v_temphrs,'HH24:MI:SS')-to_timestamp(v_outpunch1,'HH24:MI:SS');
v_TotalHrsMin1 := extract(hour from v_interval) * 60 + extract(minute from v_interval);

here v_interval datatype is "interval day to second" and v_temphrs datatype is varchar2 and value is : 12:00:00 and v_outpunch1 datatype is varchar2 and value is: 06:10:00
and v_totalHrsMin1 datatype is number.

here i should get value 370.
but i am getting value 350.

View 3 Replies View Related

SQL & PL/SQL :: Correct Format Of Date

Jan 30, 2011

CREATE OR REPLACE VIEW V_CATALOGUER_REPORT
(COUNT, EVENT_USER, TO_DATE, SHORT_NAME)
AS
SELECT COUNT (DISTINCT A.PART_REF),A.EVENT_USER, TO_DATE(A.EVENT_DATE, 'DD-MON-YY'),B.SHORT_NAME FROM J_SUPPLY_CHAIN_HIST A, J_SOURCE B

[code]...

i created one view,i link two tables ,i can see the correct data in this view,but the result from front end application is not correct.i cant see the dates are correct.

View 1 Replies View Related

Finding Correct DB Process?

Feb 7, 2013

1. I have 6 data bases, one process is running slowly, how do you find which data base that process belongs to?

2. I have 6 data bases, only one data base we have ASM instance, how do you find which data base has ASM?

View 1 Replies View Related

SQL & PL/SQL :: Get Output In Correct Format?

May 15, 2012

I have made below query :

select job,case when deptno=10 then ename ELSE 'null' end e10
,case when deptno=20 then ename ELSE 'null' end e20
,case when deptno=30 then ename ELSE 'null' end e30
from emp
order by 1;

the output is:

JOB E10E20E30
ANALYSTnullSCOTTnull
ANALYSTnullFORDnull
CLERKnullSMITHnull

[code]...

but I want data in one row, i mean for example in case of JOB as 'CLERK' the output should be : i.e.

JOB E1 E2 E3
CLERK MILLER ADAMS JAMES
CLERK SMITH

the complete correct output which I want is:

JOB E1 E2 E3
ANALYST SCOTT
ANALYST FORD
CLERK MILLER ADAMS JAMES

[code]....

View 3 Replies View Related

PL/SQL :: Calculating Correct Offset For SQL

Nov 22, 2012

formulating sql query

Basically what I want is that I need to get desired result in such a way that, whenever Transaction type is Sales Order Issue, I want last TRANSACTION_COSTED_DATE of 'Intransit Shipment'

INVENTORY_ITEM_ID     TRANSACTION_COSTED_DATE     TRANSACTION_TYPE     R
123     28-06-2012 21:36     Intransit Shipment     
123     23-07-2012 01:25     Sales order issue     28-06-2012 21:36
123     30-07-2012 05:20     Sales order issue     28-06-2012 21:36

[Code]...

Lag with offset 1 doesn’t work as it will only go to previous row, What I want is that it should go to row above where transaction type is Intransit Shipment

Sample data and query I tried

with sampl_rownum_reset as
(select '123' inventory_item_id,
to_date ('28-Jun-2012 9:36:23 PM ', 'DD-MON-RRRR HH:MI:SS AM')
transaction_costed_date,
to_date ('28-Jun-2012 9:35:23 PM ', 'DD-MON-RRRR HH:MI:SS AM')

[Code]....

View 2 Replies View Related

Insert Using Append / Bulk Correct?

Aug 3, 2011

I want to know which is the most efficient insert method among the followiing

1)using the hint append
or
2)bulk collect. Preferably I'd like to know which method of inserting for say 2-5 millions rows is the best.

View 6 Replies View Related







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