oracle11g

How to echo text during SQL script execution in SQLPLUS

风流意气都作罢 提交于 2019-12-20 11:08:04
问题 I have a batch file which runs a SQL script in sqlplus and sends the output to a log file: sqlplus user/pw < RowCount.sql > RowCount.log My log file contains this: Connected to: Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production SQL> SQL> COUNT(*) ---------- 0 SQL> COUNT(*) ---------- 0 etc. but it's several thousand lines of output and therefore hard to determine which results belong to which statement. I would like to add some formatting to the output, so that I may discern

Where to get this Java.exe file for a SQL Developer installation

…衆ロ難τιáo~ 提交于 2019-12-20 10:16:42
问题 I just installed Oracle 11g, and tried to start Oracle SQL developer so as to start writing queries. It is asking me: Enter the full pathname for the java.exe file . Where do I find this? I did a global search for java.exe and am sure did not get some Oracle related pdf files. Also my Oracle is installed out of users/vas. 回答1: I found my java.exe that worked for SQL Developer at C:\ORACLE11G\product\11.2.0\client_1\jdk\bin where C:\ORACLE11G is my Oracle Home. The client that I have installed

Oracle developer VM with Oracle 11g

…衆ロ難τιáo~ 提交于 2019-12-20 09:45:20
问题 I found here very good image for VirtualBox with oracle DB and Oracle Linux. But problem is, that I want to use Oracle 11g, but not 12c as in this image. I can't find link for this iso, but I am sure, that it must be in offcial Oracle site. 回答1: This one has Oracle 11g database and SQL Developer: http://download.oracle.com/otn/other/virtualbox/dd/Oracle_Developer_Day.ova See http://praitheesh.blogspot.nl/2013/10/oracle-developer-day-vm-how-to-use-pre.html for instructions EDIT : Included

How to import an Oracle database from dmp file and log file?

徘徊边缘 提交于 2019-12-20 08:22:31
问题 How would I go about to create a database from a dmp-file? I do not have an existing database with the same structure on my system so it has to be complete with jobs, events, tables and so on. I placed dmp and log file in E: drive I have tried the import utility E:/>impdp system/tiger@oratest FILE=WB_PROD_FULL_20MAY11.dmp But I'm getting error as invalid argument value bad dump file specification unable to open dump file "E:\app\Vensi\admin\oratest\dpdump\WB_PROD_F ULL_20MAY11.dmp" for read

How to import an Oracle database from dmp file and log file?

一个人想着一个人 提交于 2019-12-20 08:20:06
问题 How would I go about to create a database from a dmp-file? I do not have an existing database with the same structure on my system so it has to be complete with jobs, events, tables and so on. I placed dmp and log file in E: drive I have tried the import utility E:/>impdp system/tiger@oratest FILE=WB_PROD_FULL_20MAY11.dmp But I'm getting error as invalid argument value bad dump file specification unable to open dump file "E:\app\Vensi\admin\oratest\dpdump\WB_PROD_F ULL_20MAY11.dmp" for read

Oracle update query to update records in sequential order

二次信任 提交于 2019-12-20 07:38:45
问题 I have a table in Oracle SQL whose ids are in increasing, sequential order, but there are gaps in the ids due to editing, e.g. the ids are currently something like 22 23 24 32 33 44 ...etc I check one post and the solution provided was as below: update (select t.*, row_number() over (order by id) as newid) toupdate set id = newid Solution Provided earlier. Now my query: 1) I guess the "From clause" is missing in the above query. Updated query: update (select t.*, row_number() over (order by

Check DATE format in Oracle

心已入冬 提交于 2019-12-20 07:35:37
问题 I have below SELECT query in a procedure. I need to add another validation check for SUBMTD_SRVC_DATE column. If the value of SUBMTD_SRVC_DATE is in any format other than 'MMDDYYYY', then I need to populate '00000000'. Suppose, if SUBMTD_SRVC_DATE = '100515', then I need to automatically populate '00000000'. Could anyone please on that. Thanks in advance. SELECT CASE WHEN SMS.SRVC_UNITS IS NULL OR SMS.SRVC_UNITS = -8888 OR SMS.SRVC_UNITS = -9999 THEN '0000000' ELSE LPAD( SMS.SRVC_UNITS , 7 ,

How to set table names and columns as case sensitive in oracle 11g?

孤者浪人 提交于 2019-12-20 07:24:05
问题 I have a .NET 4.0 application that uses Entity Framework 4 that connects to a MS SQL 2008 database. The naming convention used is for example table "Clients", fields : "Id", "Id_Order". Now I need to switch from SQL Server to Oracle Server, so I migrated the MS SQL database to oracle database, but the problem is that all the table names and column names are uppercased, so by generating the edmx for oracle(using ODAC), I will have to change in code from "Clients" to "CLIENTS", "Id" to "ID",

nested select or join query?

拟墨画扇 提交于 2019-12-20 07:16:16
问题 i am new to sql so this may have a very basic answer but the question to answer is as follows ..... which film has taken the least takings at a performance? include film name and cinema name in the result.? film name and cinema name are in two different table film and cinema . takings are in the performance table. i cant figure out how to complete this query. this is what i have got so far but it comes with an error in line 3 column 7. select cinema_no,film_no from CINEMA, film where takings

Oracle SQL syntax

这一生的挚爱 提交于 2019-12-20 06:55:53
问题 This is my table structure . I have many problems in trying to make different things work . How do I enter the values into task where Monday = 62 ? INSERT INTO it_time_track (task,percentage) VALUES ('Support',null) where Monday=62; commit ; This gives me an error -- I fixed it by making it an interactive Grid on Oracle Apex and doing a select to display this table and then I went on to edit it manually . 回答1: UPDATE it_time_track SET Monday = (SELECT SUM(Monday) FROM it_time_track ) WHERE Id