Beruflich Dokumente
Kultur Dokumente
odioracledataintegrator
I am here to discuss which people might not be aware or wouldn't have observed including malpractices and best practices.
2016 ( 104 )
HOW DOES ONE ADD A DAY / HOURS / MINUTES / SECONDS TO A DATE VALUE
February ( 104 )
HOW DOES ONE ADD A DAY / HOURS /
SQL>SELECTSYSDATE,SYSDATE+1/24,SYSDATE+1/1440,SYSDATE+1/86400 MINUTES / SECONDS...
HOW TO RETRIEVE THE Nth HIGHEST SAL
FROM A TABLE
FROMDUAL DISPLAY A QUERY TO DISPLAY LAST ROW
OF EMP TABLE
Get no.of employees working under each
manager. Co...
SYSDATESYSDATE+1SYSDATE+1SYSDATE+1 Get the dept which is paid highest salary.
Get the details of employees who is paid
highest i...
write a query to display the last row of the
table...
http://odioracledataintegrator.blogspot.in/search?updatedmin=20160101T00:00:0008:00&updatedmax=20170101T00:00:0008:00&maxresults=50 1/42
2/17/2016 <marquee>odioracledataintegrator</marquee>
DISPLAY THOSE EMPLOYEES WHOSE NAME
MAX(ROWNUM)FROMEMP) CONTAINING 4 CH...
DISPLAY THOSE EMPLOYEES NAME
CONTAINING CHARS A,E ...
DISPLAY THOSE EMPLOYEES NAMES 3RD
CHAR CONTAINING...
EMPNOENAMEJOBSALDEPTNO
DISPLAY THOSE EMPLOYEES NAME START
WITH S AND 2N...
DISPLAY THOSE EMPLOYEES HIRED IN THE
YEAR 81;
DISPLAY THE EMLOYEES WHO WERE HIRED
7934MILLERCLERK130010 IN THE MOTH OF...
DISPLAY EMPLOYEES DETAILS ALONG WITH
THEIR ANUAL S...
DISPLAY THE ENAME,SAL,12*SAL FROM EMP
Posted by venkatesh amruthapudi at 02:59 1 comment Links to this post
ORDER BY 12*...
+1 Recommend this on Google
How to connect PostgreSQL with ODI?
Labels: SQL How to enable or disable ewallet password
in ODI?
Get no.of employees working under each manager. Column names may vary Is it possible to create a constraint at ODI,
what...
is it possible to to delete erroneous or
SQL>selectmgr,count(1)fromempwheremgrisnotnullgroupbymgr invalid d...
How to create a default filter for a source
data s...
What happens if there is no Primary Key
MGRCOUNT(*) defined in...
Significance of FLOW Control and steps to
perform ...
Significance of STATIC CONTROL and steps
to perfor...
How does recycle errors feature works in
78393 ODI?
If we have 2 identical records and one of
them is ...
77821
Caused By: org.apache.bsf.BSFException:
exception ...
Get the details of employees who is paid highest in each dept DISPLAY EMPNO,ENAME,JOB,SAL,DEPTNO
OF THOSE EMPLOY...
http://odioracledataintegrator.blogspot.in/search?updatedmin=20160101T00:00:0008:00&updatedmax=20170101T00:00:0008:00&maxresults=50 2/42
2/17/2016 <marquee>odioracledataintegrator</marquee>
DISPLAY EMPNO,ENAME,JOB,SAL AND
select*fromempwhere(deptno,sal)in(selectdeptno,max(Sal)salfromempgroupby DEPTNO OF THAT EMP...
DISPALY EMPNO,ENAME,JOB AND DEPTNO
OF THOSE EMPLOY...
deptno) DISPLAY DEPTNO,ENAME OF THAT DEPT
WHERE NO EMPLOYE...
What are constraints?
Posted by venkatesh amruthapudi at 02:55 1 comment Links to this post How to add a new constraint to an new
table or to ...
+1 Recommend this on Google
Deferred VS Deferrable constraint
Labels: SQL
WITH Clause
Is it possible to create a view without
write a query to display the last row of the table. table?
how to identify the no. of records of a
table with...
how to add a comment for a table created
in oracle...
7369SMITHCLERK800201
7521WARDSALESMAN1250303
7654MARTINSALESMAN1250305
7782CLARKMANAGER2450107
7839KINGPRESIDENT5000109
7876ADAMSCLERK11002011
7902FORDANALYST30002013
http://odioracledataintegrator.blogspot.in/search?updatedmin=20160101T00:00:0008:00&updatedmax=20170101T00:00:0008:00&maxresults=50 3/42
2/17/2016 <marquee>odioracledataintegrator</marquee>
Labels: SQL
SQL>SELECT*FROM(SELECTEMPNO,ENAME,JOB,SAL,DEPTNO,ROWNUMRN
FROMEMP)WHEREMOD(RN,2)=0
EMPNOENAMEJOBSALDEPTNORN
7369SMITHCLERK800201
7521WARDSALESMAN1250303
7654MARTINSALESMAN1250305
7782CLARKMANAGER2450107
7839KINGPRESIDENT5000109
7876ADAMSCLERK11002011
7902FORDANALYST30002013
Labels: SQL
WRITE A QUERY TO DISPLAY THOSE EMPLOYEES WHOSE ROW POSITIONS ARE 5 AND 8
SQL>SELECT*FROM(SELECTEMPNO,ENAME,JOB,SAL,DEPTNO,ROWNUMRN
FROMEMP)WHERERN=5ORRN=8
EMPNOENAMEJOBSALDEPTNORN
7654MARTINSALESMAN1250305
7788SCOTTANALYST3000208
Labels: SQL
Pseudocolumnsarecolumnswhichphysicallydoesntexistornotcreatedbyanybodyinthe
DBbutcanbequeriedatruntimetoseetheirvalues.
Example:
PSUEDOCOLUMNS:
1.SYSDATE
2.CURRENT_DATE
3.ROWID
4.CURRVAL
5.NEXTVAL
6.LEVEL
7.ROWNUM
Labels: SQL
SQL>SELECTEMPNO,ENAME,JOB,SAL,DEPTNOFROMEMPWHERESAL<(
SELECTMAX(SAL)FROMEMPWHEREDEPTNOIN(SELECTDEPTNOFROM
DEPTWHEREDNAME=SALES))
EMPNOENAMEJOBSALDEPTNO
7369SMITHCLERK80020
http://odioracledataintegrator.blogspot.in/search?updatedmin=20160101T00:00:0008:00&updatedmax=20170101T00:00:0008:00&maxresults=50 5/42
2/17/2016 <marquee>odioracledataintegrator</marquee>
7499ALLENSALESMAN160030
7521WARDSALESMAN125030
7654MARTINSALESMAN125030
7782CLARKMANAGER245010
7844TURNERSALESMAN150030
7876ADAMSCLERK110020
7900JAMESCLERK95030
7934MILLERCLERK130010
Labels: SQL
SQL>selectempno,ENAME,JOB,SAL,DEPTNOFROMEMPWHERESAL=(SELECT
MIN(SAL)FROMEMPWHEREDEPTNO=10)ANDDEPTNO=10
EMPNOENAMEJOBSALDEPTNO
7934MILLERCLERK130010
Labels: SQL
SQL>SELECTEMPNO,ENAME,JOB,DEPTNOFROMEMPWHEREEMPNOIN(
SELECTDISTINCTMGRFROMEMP)
EMPNOENAMEJOBDEPTNO
7566JONESMANAGER20
http://odioracledataintegrator.blogspot.in/search?updatedmin=20160101T00:00:0008:00&updatedmax=20170101T00:00:0008:00&maxresults=50 6/42
2/17/2016 <marquee>odioracledataintegrator</marquee>
7698BLAKEMANAGER30
7782CLARKMANAGER10
7788SCOTTANALYST20
7839KINGPRESIDENT10
7902FORDANALYST20
Sharethis:
Labels: SQL
SQL>select*fromdeptwherenotexists(select1fromempwhere
dept.deptno=emp.deptno)
or
SQL>SELECTDEPTNO,DNAMEFROMDEPTWHEREDEPTNOIN(SELECT
DEPTNOFROMDEPTMINUSSELECTDISTINCTDEPTNOFROMEMP)
or
SQL>SELECTDEPTNO,DNAMEFROMDEPTWHEREDEPTNOIN(SELECT
DEPTNOFROMDEPTMINUSSELECTDISTINCTDEPTNOFROMEMP)
Labels: SQL
http://odioracledataintegrator.blogspot.in/search?updatedmin=20160101T00:00:0008:00&updatedmax=20170101T00:00:0008:00&maxresults=50 7/42
2/17/2016 <marquee>odioracledataintegrator</marquee>
thatrestrictsthevaluesinadatabase.OracleDatabaselets
youcreatesixtypesofconstraintsandletsyoudeclarethem
intwoways.
Labels: SQL
Itispossibletoaddanewconstrainttoanexistingtableorto
anewtable.
http://odioracledataintegrator.blogspot.in/search?updatedmin=20160101T00:00:0008:00&updatedmax=20170101T00:00:0008:00&maxresults=50 8/42
2/17/2016 <marquee>odioracledataintegrator</marquee>
belowarethedifferentwayswecanaddacolumn.
Indatabasedesign,acompoundkeyisakeythatconsistsof
twoormoresimplekeysthatuniquelyidentifyanentity
occurrence.Asimplekeyisonethathasonlyone
attribute.Compoundkeysmaybecomposedofotherunique
simplekeys,butmaynotincludeanothercompoundkeyorA
keyformedbycombiningatleasttwoormorecolumnsis
calledcompositekey.
Acandidatekeyisakeythatuniquelyidentifiesrowsina
table.Anyoftheidentifiedcandidatekeyscanbeusedasthe
tablesprimarykey.Candidatekeysthatarenotpartofthe
primarykeyarecalledalternatekey.
http://odioracledataintegrator.blogspot.in/search?updatedmin=20160101T00:00:0008:00&updatedmax=20170101T00:00:0008:00&maxresults=50 9/42
2/17/2016 <marquee>odioracledataintegrator</marquee>
Onecandescribeacandidatekeyasasuperkeythatcontains
onlytheminimumnumberofcolumnsnecessarytodetermine
uniqueness.
Therecanbeakeyapartfromprimarykeyinatablethatcan
alsobeakey.Thiskeymayormaynotbeauniquekey.For
example,inanemployeetable,empnoisaprimarykey,
empnameisaalternatekeythatmaynotbeuniquebutstill
helpsinidentifyingarowofthetable.
Analternatekeyissimilartoaprimarykey.Itacceptsnull
valueswhereastheprimarykeydoesnot.Thenullvalues
canbesubmittedtotheattributeinatuple.
http://odioracledataintegrator.blogspot.in/search?updatedmin=20160101T00:00:0008:00&updatedmax=20170101T00:00:0008:00&maxresults=50 10/42
2/17/2016 <marquee>odioracledataintegrator</marquee>
KEYSAREOF2TYPES.
1.TABLELEVELCOLUMNS
2.COLUMNLEVELCOLUMNS
APARTFROMNULLCONSTRAINTRESTOFALLTHE
CONSTRAINTSCANBEADDEDATTABLELEVEL.
HOWTOCREATEACONSTRAINTWHILE
CREATINGATABLE
ADDINGACONSTRAINTATTABLELEVEL:
CREATETABLEtable_name
(
column1datatypenull/notnull,
column2datatypenull/notnull,
...
CONSTRAINTconstraint_namePRIMARY
KEY(column1,column2,...column_n)
);
ADDINGACONSTRAINTATCOLUMNLEVEL:
http://odioracledataintegrator.blogspot.in/search?updatedmin=20160101T00:00:0008:00&updatedmax=20170101T00:00:0008:00&maxresults=50 11/42
2/17/2016 <marquee>odioracledataintegrator</marquee>
CREATETABLEtable_name
(
column1datatypePRIMARYKEY,
column2datatypenull/notnull,
...
);
HOWTOADDACONSTRAINTTOANEXISTING
TABLE
ALTERTABLEsupplier
ADDCONSTRAINTsupplier_pkPRIMARYKEY
(supplier_id,supplier_name);
ALTERTABLEtable_name
ADDCONSTRAINTconstraint_name
FOREIGNKEY(column1)
REFERENCESparent_table(column1);
Labels: SQL
pleaseusethebelowreferencelinkforreference
http://odioracledataintegrator.blogspot.in/search?updatedmin=20160101T00:00:0008:00&updatedmax=20170101T00:00:0008:00&maxresults=50 12/42
2/17/2016 <marquee>odioracledataintegrator</marquee>
Clickonhttp://myorastuff.blogspot.in/2009/05/deferredconstraints.htmlfordetail
description.
Labels: SQL
WITH Clause
andwasaddedintotheOracleSQLsyntaxinOracle9.2.TheWITHclausemay
beprocessedasaninlinevieworresolvedasatemporarytable.Theadvantageof
thelatteristhatrepeatedreferencestothesubquerymaybemoreefficientasthe
dataiseasilyretrievedfromthetemporarytable,ratherthanbeingrequeriedby
eachreference.Youshouldassesstheperformanceimplicationsof
Forreferenceandexamplesusethebelowlink.
https://oraclebase.com/articles/misc/withclaus
Labels: SQL
http://odioracledataintegrator.blogspot.in/search?updatedmin=20160101T00:00:0008:00&updatedmax=20170101T00:00:0008:00&maxresults=50 13/42
2/17/2016 <marquee>odioracledataintegrator</marquee>
Aviewcanbecreatedevenifthedefiningqueryoftheviewcannotbeexecuted.
Wecallsuchaviewasviewwitherrors.
Forexample,ifaviewreferstoanonexistenttableoraninvalidcolumnofan
existingtableoriftheowneroftheviewdoesnothavetherequiredprivileges,
thentheviewcanstillbecreatedandenteredintothedatadictionary.
Wecancreatesuchviews(i.e.viewwitherrors)byusingtheFORCEoptioninthe
CREATEVIEWcommand:
Example:
createforceviewv1asselect*fromxyz
whenwetrytoquerythedatafromview:
select*fromv1belowerrorwastriggered.
ORA04063:viewSCOTT.V1haserrors
04063.00000%shaserrors
*Cause:Attempttoexecuteastoredprocedureoruseaviewthathas
http://odioracledataintegrator.blogspot.in/search?updatedmin=20160101T00:00:0008:00&updatedmax=20170101T00:00:0008:00&maxresults=50 14/42
2/17/2016 <marquee>odioracledataintegrator</marquee>
errors.Forstoredprocedures,theproblemcouldbesyntaxerrors
orreferencestoother,nonexistentprocedures.Forviews,
theproblemcouldbeareferenceintheviewsdefiningqueryto
anonexistenttable.
Canalsobeatablewhichhasreferencestononexistentor
inaccessibletypes.
*Action:Fixtheerrorsand/orcreatereferencedobjectsasnecessary.
ErroratLine:72Column:15
Labels: SQL
belowtablewillbehavingallthetableinfoalongwithsizeoccupied,no.of
records,etc
select*fromDBA_TABLESWHEREOWNER=SCOTT
togettheno.ofrecordsofatable
selectnum_rowsfromdba_tableswhereowner=SCOTTAND
http://odioracledataintegrator.blogspot.in/search?updatedmin=20160101T00:00:0008:00&updatedmax=20170101T00:00:0008:00&maxresults=50 15/42
2/17/2016 <marquee>odioracledataintegrator</marquee>
TABLE_NAME=EMP
NUM_ROWS
5194
Labels: SQL
wecanaddacommenttoanexistingtableusingfollowingcommands.
Syntax:COMMENTON<TABLE_NAME>IS<COMMENT>
ALLTHECOMMENTSTATEMENTSAREAUTOCOMMIT
STATEMENTS.
COMMENTONTABLEEMP
ISTHISISCREATEDFORLEARNINGPURPOSEBYDEFAULT
COMMIT
http://odioracledataintegrator.blogspot.in/search?updatedmin=20160101T00:00:0008:00&updatedmax=20170101T00:00:0008:00&maxresults=50 16/42
2/17/2016 <marquee>odioracledataintegrator</marquee>
COMMENTONTABLEDEPTISTHISISCREATEDFORLEARNING
PURPOSE
ROLLBACK
howtofindthecommentsofatable?
select*fromall_tab_comments
select*fromall_tab_commentswheretable_name=EMP
OWNERTABLE_NAMETABLE_TYPECOMMENTS
SCOTTDEPTTABLETHISISCREATEDFOR
LEARNINGPURPOSE
FORCOLUMNS:
syntax:COMMENTONCOLUMNEMP.EMPNOISthiscontainstheempnoof
alltheemployeesuniiquelysinceitishavingtheprimarykeyonit
select*fromSYS.ALL_COL_COMMENTSwhere
http://odioracledataintegrator.blogspot.in/search?updatedmin=20160101T00:00:0008:00&updatedmax=20170101T00:00:0008:00&maxresults=50 17/42
2/17/2016 <marquee>odioracledataintegrator</marquee>
COLUMN_NAME=EMPNO
OWNERTABLE_NAMECOLUMN_NAMECOMMENTS
SCOTTEMPEMPNOthiscontainstheempnoofalltheemployeesuniiquely
sinceitishavingtheprimarykeyonit.
@NOTE:itisnotpossibletoaddacommentwhilecreatingatablewithoutusing
aseparatecommand
Labels: SQL
ifwewanttofindthecommentsfordictionarytableswecanusethecommand:
select*fromdictionarywheretable_name=ALL_TABLES
TABLE_NAMECOMMENTS
ALL_TABLESDescriptionofrelationaltablesaccessibletotheuser1
http://odioracledataintegrator.blogspot.in/search?updatedmin=20160101T00:00:0008:00&updatedmax=20170101T00:00:0008:00&maxresults=50 18/42
2/17/2016 <marquee>odioracledataintegrator</marquee>
Labels: SQL
weneedtologintotheusersysorsystemtodropanyuser,iftheuserdoesnthave
anysharingwithotherusersthentheSCHEMAcanbedroppedstraightaway
usingDROPUSERcommand,whereinthecaseofsharingwehavetouse
CASCADEalongwithDROPUSERCOMMAND.
Example:userwithoutanysharing,
DROPUSER<user_name>
Example:userwithsharing,
DROPUSER<user_name>CASCADE
Errorstartingatline:xxincommand
dropuserxys
Errorreport
SQLError:ORA01922:CASCADEmustbespecifiedtodropXYS
http://odioracledataintegrator.blogspot.in/search?updatedmin=20160101T00:00:0008:00&updatedmax=20170101T00:00:0008:00&maxresults=50 19/42
2/17/2016 <marquee>odioracledataintegrator</marquee>
01922.00000CASCADEmustbespecifiedtodrop%s'
*Cause:Cascadeisrequiredtoremovethisuserfromthesystem.The
userownsobjectwhichwillneedtobedropped.
*Action:Specifycascade.
IfwedonotusetheCASCADEalongwiththedropcommandaboveerrorwill
occur.
Labels: SQL
What is the default no. of attempts to lock an account in case of wrong password?
FOLLOWINGARETHEDEFAULTPARAMETERSWILLBESETTOANYUSERCOMESBY
DEFAULTFORolderversions.
ThisscriptaltersthedefaultparametersforPasswordManagement
ThismeansthatalltheusersonthesystemhavePasswordManagement
enabledandsettothefollowingvaluesunlessanotherprofileis
createdwithparametervaluessettodifferentvalueorUNLIMITED
iscreatedandassignedtotheuser.
EnablethisifyouwantolderversionofthePasswordProfileparameters
http://odioracledataintegrator.blogspot.in/search?updatedmin=20160101T00:00:0008:00&updatedmax=20170101T00:00:0008:00&maxresults=50 20/42
2/17/2016 <marquee>odioracledataintegrator</marquee>
ALTERPROFILEDEFAULTLIMIT
PASSWORD_LIFE_TIME60
PASSWORD_GRACE_TIME10
PASSWORD_REUSE_TIME1800
PASSWORD_REUSE_MAXUNLIMITED
FAILED_LOGIN_ATTEMPTS3
PASSWORD_LOCK_TIME1/1440
PASSWORD_VERIFY_FUNCTIONverify_function
FOLLOWINGARETHEDEFAULTPARAMETERSWILLBESETTOANYUSERCOMESBY
DEFAULTfornewversion(FOR11G)
ALTERPROFILEDEFAULTLIMIT
PASSWORD_LIFE_TIME180
PASSWORD_GRACE_TIME7
PASSWORD_REUSE_TIMEUNLIMITED
PASSWORD_REUSE_MAXUNLIMITED
http://odioracledataintegrator.blogspot.in/search?updatedmin=20160101T00:00:0008:00&updatedmax=20170101T00:00:0008:00&maxresults=50 21/42
2/17/2016 <marquee>odioracledataintegrator</marquee>
FAILED_LOGIN_ATTEMPTS10
PASSWORD_LOCK_TIME1
PASSWORD_VERIFY_FUNCTIONverify_function_11G
Labels: SQL
ifwedonnotspecifytheprofilenameforausercreatedbydefaultwillbeassignedwithDEFAULTprofile,if
wewanttoassignaprofilemanuallywecanusethebelowsyntax:
CREATEUSER<user_name>IDENTIFIEDBY<pasword>PROFILE<profile_name>
orifwewanttoaltertheprofileofauserwecanusethefollowingsyntax:
alterprofilefinance_usersetfailed_login_attempts=4
Labels: SQL
selectlimitfromdba_usersa,dba_profilesbwhereb.PROFILE=a.PROFILEanda.USERNAME=XYSand
b.RESOURCE_NAME=FAILED_LOGIN_ATTEMPTS
Labels: SQL
how to calculate the max value till current row, after the current row in a oracle
table?
selecta.*,max(sal)over(orderbydeptnorowsunboundedpreceding)max_sal_til_current_row,min(sal)over(orderby
deptnorowsunboundedpreceding)min_sal_til_cur_row,
http://odioracledataintegrator.blogspot.in/search?updatedmin=20160101T00:00:0008:00&updatedmax=20170101T00:00:0008:00&maxresults=50 22/42
2/17/2016 <marquee>odioracledataintegrator</marquee>
max(sal)over(orderbydeptnorowsunboundedpreceding)max_sal_from_cur_row,min(sal)over(orderbydeptnorows
betweencurrentrowANDunboundedfollowing)min_sal_from_cur_rowfromempa
Posted by venkatesh amruthapudi at 02:12 1 comment Links to this post
Labels: SQL
or
selecta.*,sum(sal)over(orderbysalROWSBETWEENUNBOUNDEDPRECEDINGANDCURRENTROW)
cumulative_salFROMEMPA
CUMULATIVE_S
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
AL
http://odioracledataintegrator.blogspot.in/search?updatedmin=20160101T00:00:0008:00&updatedmax=20170101T00:00:0008:00&maxresults=50 23/42
2/17/2016 <marquee>odioracledataintegrator</marquee>
Posted by venkatesh amruthapudi at 02:11 1 comment Links to this post
Labels: SQL
EMPNOENAMEJOBMGRHIREDATESALCOMMDEPTNO
7566JONESMANAGER783902APR812975020
7876ADAMSCLERK778823MAY871100020
7900JAMESCLERK769803DEC81950030
Labels: SQL
EMPNOENAMEJOBMGRHIREDATESALCOMMDEPTNO
7369ALLENSALESMAN769820FEB81160030030
7521WARDSALESMAN769822FEB81125050030
7654MARTINSALESMAN769828SEP811250140030
7698BLAKEMANAGER783901MAY812850030
7782CLARKMANAGER783909JUN812450010
7876ADAMSCLERK778823MAY871100020
7900JAMESCLERK769803DEC81950030
Labels: SQL
OR
SQL>SELECT*FROMEMPWHERELENGTH(ENAME)=4
EMPNOENAMEJOBMGRHIREDATESALCOMMDEPTNO
7521WARDSALESMAN769822FEB81125050030
7839KINGPRESIDENT17NOV815000010
7902FORDANALYST756603DEC813000020
Labels: SQL
http://odioracledataintegrator.blogspot.in/search?updatedmin=20160101T00:00:0008:00&updatedmax=20170101T00:00:0008:00&maxresults=50 24/42
2/17/2016 <marquee>odioracledataintegrator</marquee>
OR
SELECT*FROMEMPWHEREENAMELIKE%A%ANDENAMELIKE%E%
EMPNOENAMEJOBMGRHIREDATESALCOMMDEPTNO
7369ALLENSALESMAN769820FEB81160030030
7698BLAKEMANAGER783901MAY812850030
7900JAMESCLERK769803DEC81950030
Labels: SQL
OR
select*fromempwhereinstr(ename,L)=3
EMPNOENAMEJOBMGRHIREDATESALCOMMDEPTNO
7369ALLENSALESMAN769820FEB81160030030
7934MILLERCLERK778223JAN821300010
EMPNOENAMEJOBMGRHIREDATESALCOMMDEPTNO
7566S_HWAG
Labels: SQL
SQL>SELECT*FROMEMPWHEREHIREDATELIKE%81%
OR
SQL>SELECT*FROMEMPWHERETO_CHAR(HIREDATE,YY)=81
OR
http://odioracledataintegrator.blogspot.in/search?updatedmin=20160101T00:00:0008:00&updatedmax=20170101T00:00:0008:00&maxresults=50 25/42
2/17/2016 <marquee>odioracledataintegrator</marquee>
SQL>SELECT*FROMEMPWHEREEXTRACT(YEARFROMHIREDATE)=1981
EMPNOENAMEJOBMGRHIREDATESALCOMMDEPTNO
7369ALLENSALESMAN769820FEB81160030030
7521WARDSALESMAN769822FEB81125050030
7566JONESMANAGER783902APR812975020
7654MARTINSALESMAN769828SEP811250140030
Labels: SQL
OR
SQL>SELECT*FROMEMPWHERETRIM(TO_CHAR(HIREDATE,MONTH))=APRIL
OR
SQL>SELECT*FROMEMPWHERETO_CHAR(HIREDATE,MON)=APR
OR
SQL>SELECT*FROMEMPWHEREHIREDATELIKE___A%
OR
SQL>SELECT*FROMEMPWHERETO_CHAR(TO_DATE(HIREDATE,DDMMYYYY),MM)=04
EMPNOENAMEJOBMGRHIREDATESALCOMMDEPTNO
7566JONESMANAGER783902APR812975020
7788SCOTTANALYST756619APR873000020
Labels: SQL
SELECTE.*,SAL*12ANUAL_SALFROMEMPE
EMPNOENAMEJOBMGRHIREDATESALCOMMDEPTNOANUAL_SAL
7541SMITHclerk790201JAN01800209600
7744JONESMANAGER783902APR8129752035700
http://odioracledataintegrator.blogspot.in/search?updatedmin=20160101T00:00:0008:00&updatedmax=20170101T00:00:0008:00&maxresults=50 26/42
2/17/2016 <marquee>odioracledataintegrator</marquee>
7560SMITHCLERK790217DEC80800209600
7693ALLENSALESMAN769820FEB8116003003019200
Labels: SQL
SELECTENAME,SAL*12ANNUAL_SALFROMEMPORDERBYANNUAL_SAL
OR
SELECTENAME,SAL*12ANNUAL_SALFROMEMPORDERBYSAL*12
OR
SELECTENAME,SAL*12ANNUAL_SALFROMEMPORDERBY2
hereIamhavingODI11.1.1.9withJDK1.7andPGAdmin1.20.0.andPostgreSQLversion9.4.
ifyouarelookingtodownloadandinstallPostgreSQLcanbedownloadedfromthebelowURLfortesting.
PostgreSQLDownload
pleasenotethatwecancreaterepositories(MASTERANDWORKREPOSITORIES)inPostgreSQLtillODI11.1.1.9but
ODI12conwardswecantcreateanynewnewrepositoryorevencantmaintaintherepositoriesinPostgreSQLifwe
upgradetoODI12cfromanypreviousversion.
herewegohowtomakeconnectionstoPostgreSQLfromODI.
belowdiagramshowshowtocreateanewdatabaseinPostgreSQL.
http://odioracledataintegrator.blogspot.in/search?updatedmin=20160101T00:00:0008:00&updatedmax=20170101T00:00:0008:00&maxresults=50 27/42
2/17/2016 <marquee>odioracledataintegrator</marquee>
hereentertheDBnamewantedtogiveandonpreviligesselecttherolewantedtogrant.
http://odioracledataintegrator.blogspot.in/search?updatedmin=20160101T00:00:0008:00&updatedmax=20170101T00:00:0008:00&maxresults=50 28/42
2/17/2016 <marquee>odioracledataintegrator</marquee>
belowdiagramshowshowtocreateanewuserintheDBalongwithnameoftheLOGIN,passwordandtherolesprivileges
wantedtogranttouser.
http://odioracledataintegrator.blogspot.in/search?updatedmin=20160101T00:00:0008:00&updatedmax=20170101T00:00:0008:00&maxresults=50 29/42
2/17/2016 <marquee>odioracledataintegrator</marquee>
http://odioracledataintegrator.blogspot.in/search?updatedmin=20160101T00:00:0008:00&updatedmax=20170101T00:00:0008:00&maxresults=50 30/42
2/17/2016 <marquee>odioracledataintegrator</marquee>
aftercreatingtheDB,loginandschemanowletscreatetheconnectioninTopology.
http://odioracledataintegrator.blogspot.in/search?updatedmin=20160101T00:00:0008:00&updatedmax=20170101T00:00:0008:00&maxresults=50 31/42
2/17/2016 <marquee>odioracledataintegrator</marquee>
ifwelookatthebelowdiagramIhaveprovidedtheportnumberas1522(Ihavechangedto1522buttheoriginaland
defaultportforPostgreSQLwillbe5432).
hereihaveprovidedalltheparametersproperly,nowletstestconnection.
OOPS!,testconnectionfailedbecausethisisathirdpartydriverhencethesehastobeplaced2locations.
1.C:\Users\vamrutha\AppData\Roaming\odi\oracledi\userlib(forODIStudiototestconnectionwithlocalagent)
2.C:\Windows\System32\cmd.exe(ForStandAloneagenttotestthedataserverconnection)
http://odioracledataintegrator.blogspot.in/search?updatedmin=20160101T00:00:0008:00&updatedmax=20170101T00:00:0008:00&maxresults=50 32/42
2/17/2016 <marquee>odioracledataintegrator</marquee>
NowIhaveplacedthedriverinthelocation,whenitesttheconnectionitfailedtoconnectwithlocalagentbecauseafter
placingthedriversIhaventrestarttheStudio.
restartthemachineandseeiftheconnectionissuccessful,ifstilldoesntsuccessrestartthemachine,stilldoesntsucceeds
raiseanSRwithOracleSupportteam.
Pleaseletmeknowifyouhaveanydoubtsorsuggestions.
Regards
Venkatesh
Labels: connections in topology , odi , oracle data integrator , postgres , postgresql , topology
eventhoughwehavemultipleODIHomesalltogetherwillbeusingsamewalletpasswordsincewalletpasswordwillbe
locatedinC:\Users\vamrutha\AppData\Roaming\odi\oracledi\ewallet.
http://odioracledataintegrator.blogspot.in/search?updatedmin=20160101T00:00:0008:00&updatedmax=20170101T00:00:0008:00&maxresults=50 33/42
2/17/2016 <marquee>odioracledataintegrator</marquee>
ifwehavemultipleusersusingthesamemachineconcurrentlythensomebody(ex:ODIAdmin)needtologinto
individualusers,copythefileformC:\Users\vamrutha\AppData\Roaming\odi\oracledi\ewalletindividualusershome
folders.
forexampleifIhave3uersnamelyDanny,JohnandMikeweneedtoplacetheewallet.p12in
C:\Users\Danny\AppData\Roaming\odi\oracledi\ewallet
C:\Users\John\AppData\Roaming\odi\oracledi\ewallet
C:\Users\Mike\AppData\Roaming\odi\oracledi\ewallet
howeverifwewanttoenableordisablethewalletpasswordstoragewehaveoptionin12cbutdonthaveoptionin11g
insteadifwedonthaveewalletpasswordstoredin11gthenitwillprompttoenternewpasswordtostorethecredentialsor
elsewecanchoosetostoreinternally.
onceagainifwewanttoenablethepasswordweneeddeletetheewalletpasswordthenwillbeaskingforwalletpassword.
pleasehavealookatthebelowreferencescreenshots,herewedonthaveanyoptioncalledODI>userinterface
belowscreenshotshowshowtoenableordisableewalletpasswordstorageinODI12c.
gotoODIstudio>Tools>Preferences.
http://odioracledataintegrator.blogspot.in/search?updatedmin=20160101T00:00:0008:00&updatedmax=20170101T00:00:0008:00&maxresults=50 34/42
2/17/2016 <marquee>odioracledataintegrator</marquee>
cselectODI>user_Interface,herewecanseeSaveLoginCredentialsintoWalletoption,ifsettingthisfirsttimecheck
thisoption.
thenwhentriedlogginginwillprompttoenterthepasswordforwalletorelsealsocanchosetostorethepasswords
internallybutnotintowalletwhichequaltodisablingthewalletpassword,herewealsocansettheexpirydateforwallet
password.
pleasehavealookatthebelowscreenshot.
http://odioracledataintegrator.blogspot.in/search?updatedmin=20160101T00:00:0008:00&updatedmax=20170101T00:00:0008:00&maxresults=50 35/42
2/17/2016 <marquee>odioracledataintegrator</marquee>
likeasotheroraclecredentialswehaveaconstraintwhilesettingthewalletpasswordthatitshouldbehavingminimum8
characterslengthincludingspecialcharacterorelsethebelowerrorwillbetriggered.
Oncewehadsetthewalletpasswordsuccessfullyifwenavigateto
C:\Users\vamrutha\AppData\Roaming\odi\oracledi\ewalletwewillbeabletoseetheewallet.p12file.
nowletsclickonconnect,andinspecttheloginpropertiesinstudiowewillbeabletoseesomethinglikethis.
ifwannadisablethewalletpasswordwillbeaskingforwalletpassword,ifyouforgotthewalletpasswordyoucango
thoughhowtorecoverthewalletpassword
http://odioracledataintegrator.blogspot.in/search?updatedmin=20160101T00:00:0008:00&updatedmax=20170101T00:00:0008:00&maxresults=50 36/42
2/17/2016 <marquee>odioracledataintegrator</marquee>
orelsethewallet.p12filefromC:\Users\vamrutha\AppData\Roaming\odi\oracledi\ewallet
andtrytologinintoODIwillbepromptingsomethinglikeasbelowscreen.
onceweenterthewalletpasswordorchosestorepasswordwithoutsecurewalletandlookattheconnectionpropertiesit
willbesomethinglikethis.
heredonhavethepasswordsbutrestofthefieldsareavailable.
ifyoudontknowwhatarethosepasswords,cancontactyourODIAdmins.
http://odioracledataintegrator.blogspot.in/search?updatedmin=20160101T00:00:0008:00&updatedmax=20170101T00:00:0008:00&maxresults=50 37/42
2/17/2016 <marquee>odioracledataintegrator</marquee>
Feelfreetopostyourquestionsortocomment.
Regards
Venkatesh
Labels: ewallet password , ewallet.p12 , odi , oracle data integrator , wallet password
Is it possible to create a constraint at ODI, what and all the types of constraints can
be created at ODI level?
Higuys,
hereiamusingODI11.1.1.9,
inthisarticleIamgonnadiscussaboutdifferenttypesofconstraintsthatcanbecreatedatODIlevel.
yes,itispossibletocreateaconstraintorkeywhichdoesntexistatDBlevelandwantedtocreatedatODI.
thereare2differenttypesofkeysthatcanbecreatedatODIlevel.
1.PrimaryKey.
2.ReferenceKey(ForeignKey)
3.AlternateKey
KeepreferringmyBlogformoreinterestingfeaturesgonnadiscussaboutthesekeytatODIlevelalongwiththeiruse
cases.
http://odioracledataintegrator.blogspot.in/search?updatedmin=20160101T00:00:0008:00&updatedmax=20170101T00:00:0008:00&maxresults=50 38/42
2/17/2016 <marquee>odioracledataintegrator</marquee>
Thanks
Venkatesh
Labels: constraints in ODI , different types of constraints in ODI. , odi , oracle data integrator
Thereisnointerfacethatdeletesdatafromsourcetableespeciallybyvalidatingconditionsorkeysbutwecanperformthis
inasinglestep.
ifwewanttodeleteerroneousrecordsfromasetofdatastoreswcanplaceallthosestoresinthepackageandselectthe
TYPEasDATASTORECHECKherewewillbegettinganoptioncalledDELETEERRORSFROMCHECKED
TABLE,wecancheckthistodeletefromsourceandalsotheseerrorrecordscanbeloadedintoerrortablewithoutusing
interface.
Ifwewanttoperformthisforasetofdatastoresandinsteadofplacingindividualdatastoreswecanplaceentiredata
model,ifthereareconditionsorconstraintscreatedfordatastoresbelongstoparticulardatamodelwillbeenforcedorelse
thosedatastoreswillbeignored.
intheabovescreenshotsihaveplacedbothadatastoreandadatamodel,formodelihaveselectedMODELCHECK
typeandfordatastoreIhaveselectedDATASTORECHECKtype.
ifwealsoobserveifthereareanysubmodelswithinamodelifwedontselectRECURSESUBMODELSthenthis
checkwillnotbeperformedforthose.
@NOTE:OnlyformodelswehaveanyadditionalforLogging,herewecanspecifywhetherthesessionforthemodel/store
checkhastobeloggedinornot,ifneedstobeloggedinwhetheronlyforfailuresorforall.
http://odioracledataintegrator.blogspot.in/search?updatedmin=20160101T00:00:0008:00&updatedmax=20170101T00:00:0008:00&maxresults=50 39/42
2/17/2016 <marquee>odioracledataintegrator</marquee>
KeepfollowingmyblogformoreinterestingfeaturesprovidedwithinODI.
Thanks
Venkatesh
Labels: delete error records , delete error records from source. , error records , odi , oracle data integrator
Google+ Followers
venkatesha
Addtocircles
37haveme View
incircles all
Popular Posts
Advantages of ODI or why do we need ODI or how ODI is good compared to other ETL tools?
Oracle Data Integrator (ODI) : ODI is also a ETL tool which follows the ELT (Extract Transform Load) process. The main advantage with O...
What is the difference between IKM Oracle Incremental Update, (Merge), (PLSQL) and (row by row)
IKM Oracle Incremental Update : it performs all inserts, updates and individually however it will be slower since it needs to compare valu...
Caused By: org.apache.bsf.BSFException: exception from Groovy: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Insert_flow_into_I$_table: 6:
unexpected char: \ @ line 6, column 44.
HI Friends, I am back with another unknown error for all of you. When ever we try to use IKM Oracle Incremental Update (row by row) we...
HOW DOES ONE ADD A DAY / HOURS / MINUTES / SECONDS TO A DATE VALUE
SQL> SELECT SYSDATE,SYSDATE+1/24,SYSDATE+1/1440,SYSDATE+1/86400 FROM DUAL; SYSDATE SYSDATE+1 SYSDATE+1 SYSDATE+1 ...
http://odioracledataintegrator.blogspot.in/search?updatedmin=20160101T00:00:0008:00&updatedmax=20170101T00:00:0008:00&maxresults=50 40/42
2/17/2016 <marquee>odioracledataintegrator</marquee>
odioracledataintegrator
I am here to discuss which people might not be aware or wouldn't have observed including malpractices and best practices.
Featured post
Advantages of ODI or why do we need ODI or how ODI is good compared to other ETL tools?
Oracle Data Integrator (ODI) : ODI is also a ETL tool which follows the ELT (Extract Transform Load) process. The main advantage with O...
addthis
AddThis
Wikipedia
Popular Posts
Advantages of ODI or why do we need ODI or how ODI is good compared to other ETL tools?
Oracle Data Integrator (ODI) : ODI is also a ETL tool which follows the ELT (Extract Transform Load) process. The main advantage with O...
What is the difference between IKM Oracle Incremental Update, (Merge), (PLSQL) and (row by row)
IKM Oracle Incremental Update : it performs all inserts, updates and individually however it will be slower since it needs to compare valu...
Caused By: org.apache.bsf.BSFException: exception from Groovy: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Insert_flow_into_I$_table: 6:
unexpected char: \ @ line 6, column 44.
HI Friends, I am back with another unknown error for all of you. When ever we try to use IKM Oracle Incremental Update (row by row) we...
HOW DOES ONE ADD A DAY / HOURS / MINUTES / SECONDS TO A DATE VALUE
SQL> SELECT SYSDATE,SYSDATE+1/24,SYSDATE+1/1440,SYSDATE+1/86400 FROM DUAL; SYSDATE SYSDATE+1 SYSDATE+1 SYSDATE+1 ...
Message *
Send
http://odioracledataintegrator.blogspot.in/search?updatedmin=20160101T00:00:0008:00&updatedmax=20170101T00:00:0008:00&maxresults=50 41/42
2/17/2016 <marquee>odioracledataintegrator</marquee>
http://odioracledataintegrator.blogspot.in/search?updatedmin=20160101T00:00:0008:00&updatedmax=20170101T00:00:0008:00&maxresults=50 42/42