Ref: http://www.adp-gmbh.ch/ora/ SQL /table_cast.html
Create or replace type date_obj as object (DT date)/create or replace type date_table as table of date_obj/create or replace function date_range (from_dt in date, to_dt in date) return
Recently, derivative work is required to import data from several tables to one table, where data may be duplicated. Therefore, data comparison is required before import.
Method 1: I used group by having count (*)> 1 to extract the duplicate data
The new oracle11g database was used yesterday.
It was a relatively simple problem. I should have done something about configuring TNS and modifying connectstring.
Who knows? A user name and password error is reported as soon as the database is
1. Loop
DeclareX number: = 0;BeginX: = 0;LoopX: = x + 1;/* If x> = 10 thenExit;End if ;*/Exit when x> 10; -- this sentence serves the same purpose as the above if statement, but it is so concise.Dbms_output.put_line ('Internal: x =' | X );End loop;
before connecting to the database server, first, you must enable two Oracle-related services in the control panel-Administrative Tools-service of Windows: oracleorahome92tnslistener (listener service) and oracleservicechstone (instance service ), if
Declare CNT number;
Begin--- Query whether the table to be created existsSelect count (*) into CNT from user_tables where table_name = 'entry _ modifystatus ';--- Delete the table if it exists.If CNT> 0 thenDbms_output.put_line ('table exists not
1. Connection sequence in the WHERE clause: Oracle uses the bottom-up sequence to parse the WHERE clause. According to this principle, the join between tables must be written before other where conditions, and those conditions that can filter out
Working overtime today, we found that all oracle services on the database server were lost-that is, there were no oracle services in the Service Manager, such as OracleOraDb10g_home1TNSListener and OracleServiceORCL.Solution:1. Export all oracle
Two days ago, when installing Oracle 10g, I encountered the problem of "Microsoft LoopBack Adapter configured as the system's primary network Adapter", and found other solutions on the Internet, the following is a summary:
Stop the current "Local
I. Oracle Data Dictionary
A data dictionary is a place where Oracle stores database information. It is used to describe data. For example, the Creator information, creation time information, tablespace information, and user access permission
0. database parameter attributesCol PROPERTY_NAME format a25Col PROPERTY_VALUE format a30Col DESCRIPTION format a100Select * from database_properties;
Select * from v $ version;
1. Find the SID of the current session, SERIAL #SELECT Sid, Serial #
Analysis Function over and Window Function
I. analysis function overOracle provides analysis functions starting from 8.1.6. analysis functions are used to calculate a group-based aggregate value. What is different from aggregation
After Oracle Db Provider is installed, the path of Oracle. DataAccess. dll is D: \ app \ Administrator \ product \ 11.2.0 \ client_1 \ ODP. NET \ bin \ 2.x.The following shows how to use OleDb, msdaora, System. Data. OracleClient. OracleConnection,
In the new year, I summarized some of the books I have read before. Many of them are worth reading and reading, and many are also sleepy after several pages.
Below are some books related to databases that I think are good at. I can't wait to share
--- 1. Normal equal connections
Select E. last_name, D. department_name
From employees e, departments d
Where E. department_id = D. department_id;
--- 2 left Outer JoinSelect E. last_name, E. department_id, D. department_nameFrom employees eLeft
Create or replace function idcard15to18 (card varchar2) return varchar2 is
Type tiarray is table of integer;
Type tcarray is table of char (1 );
Results varchar2 (18 );
W tiarray; -- number Array
A tcarray; -- character array
S integer;
Begin
If
For convenience, the following simple model is created and some test data is constructed:In BSS,-- Customer data tableCreate Table MERs(Customer_id number (8) Not null, -- customer IDCity_name varchar2 (10) Not null, -- CityCustomer_type char (2)
Manually configure the server listener: The Listener Configuration includes parameters of the listener protocol, address, and other related information. Listener Configuration is stored in a configuration file named listener. ora, which is located
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service