Postingan

Menampilkan postingan dari Februari, 2020

Analytic SQL CAST & VALIDATE_CONVERSION () Function for Data Validation Oracle 12c

Gambar
HappyCode #0004 : Analytic SQL CAST & VALIDATE_CONVERSION () Function for Data Validation Oracle 12c We can currently use the SQL CAST function to convert one datatype to another,  although currently there is NULL data or it will return a conversion error. Which, in the previous version, a data condition containing a NULL value returns an error. A new function VALIDATE_CONVERSION () can be used to identify if there is a conversion failure will appear,  we use the value = 0, to validate if there is a possibility of returning an error / containing NULL data Github : https://github.com/happycodingkoe/database_oracle/tree/master/Readmeshare_0004_ORA_SQLValCast Blog : https://happycodingkoe.blogspot.com/ IG : @happycodingkoe FB : https://web.facebook.com/happycoding.koe.3

Create invisible column in Database Oracle 12c

Gambar
HappyCode #0003 : Create invisible column in Database Oracle 12c Invisible column, in some cases it can help to keep data invisible in general queries (*).  We can take a look from this sample to get some ideas. DROP TABLE city_t ; CREATE TABLE city_t (   id          NUMBER,   name VARCHAR2(100) INVISIBLE,   city VARCHAR2(100)  ); insert into city_t values (1,'my city 1'); insert into city_t (id, name, city) values (2,'Tony','my city 2'); commit ; select * from city_t ; select id, name, city from city_t;  Github : https://github.com/happycodingkoe/database_oracle/tree/master/Readmeshare_0003_ORA_InvisbleCol Blog : https://happycodingkoe.blogspot.com/ IG : @happycodingkoe FB : https://web.facebook.com/happycoding.koe.3

Create table with Auto sequence in Oracle 12c

Gambar
HappyCode 0002 : Create table with Auto sequence in Oracle 12c Starting from oracle 12, we can begin to define the column of a table as an auto increment sequence directly as part of the table itself. Syntax shown as below : GENERATED [ ALWAYS | BY DEFAULT [ ON NULL ] ] AS IDENTITY [ ( identity_options ) ] For this case, we will use the IDENTITY AS ALWAYS option : CREATE TABLE demo_auto_seq_always (     id NUMBER GENERATED ALWAYS AS IDENTITY START WITH 100 INCREMENT BY 1,     object_name VARCHAR2(255) NOT NULL ); In this table, we can see the value of the "ID" column being filled in automatically, starting at 100 with increment by 1. We can use this query to find information about the IDENTITY column, by using the view "all_tab_identity_cols" Github : https://github.com/happycodingkoe/database_oracle/tree/master/Readmeshare_0002_ORA_AutoSeqAlwaysTable Blog : https://happycodingkoe.blogspot.com/ IG : @happycodingkoe FB : http...

Application can't connect to Oracle 12c Database

Gambar
HappyCode 0001 : Application can't connect to Oracle 12c Database At that time, we received mail that app client can't connect to ORCLPDB which is Oracle DB 12c ,  with this error "ORA-01033: ORACLE initialization or shutdown in progress".  Based on that error code, seems DB is down, so we just crosscheck using DBA access and Yes, DB ORCLPDB is down. So, these are the ways that we used to check and bringup the ORCLPDB database. Github : https://github.com/happycodingkoe/database_oracle Blog : https://happycodingkoe.blogspot.com/ IG : @happycodingkoe FB : https://web.facebook.com/happycoding.koe.3