,ROW_NUMBER() OVER ( PARTITION BY e.department_id ORDER BY e.salary) AS rownumber
,ROW_NUMBER() OVER ( PARTITION BY e.department_id ORDER BY e.salary) AS rownumber
sharing some tech problems and soln
,ROW_NUMBER() OVER ( PARTITION BY e.department_id ORDER BY e.salary) AS rownumber
Posted by Sajjad at 2:31 am 0 comments
Posted by Sajjad at 4:00 pm 0 comments
select
avg(extract(second from intrvl)
+ extract(minute from intrvl) * 60
+ extract(hour from intrvl) * 60 * 60
+ extract(day from intrvl) * 60 * 60 * 24) average
from (
SELECT ( TIME_STAMP1-TIME_STAMP2) intrvl
FROM Z_TABLE )
Posted by Sajjad at 1:09 pm 0 comments
<repositories>
<!-- Repository for ORACLE ojdbc6. -->
<repository>
<id>codelds</id>
<url>https://code.lds.org/nexus/content/groups/main-repo</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0.3</version>
</dependency>
</dependencies>
Posted by Sajjad at 5:06 pm 0 comments
CREATE OR REPLACE function timestamp_diff(a timestamp, b timestamp) return number is
begin
return extract (day from (a-b))*24*60*60 +
extract (hour from (a-b))*60*60+
extract (minute from (a-b))*60+
extract (second from (a-b));
end;
Posted by Sajjad at 2:44 pm 0 comments
UPDATE customers SET c_details = (SELECT contract_date FROM suppliers WHERE suppliers.supplier_name = customers.customer_name) WHERE customer_id < 1000;
UPDATE suppliers SET supplier_name = (SELECT customers.customer_name FROM customers WHERE customers.customer_id = suppliers.supplier_id) WHERE EXISTS (SELECT customers.customer_name FROM customers WHERE customers.customer_id = suppliers.supplier_id);
Posted by Sajjad at 3:08 pm 0 comments
keytool -import -alias yakeen -keystore cacerts -file yakeen-pilotingeservecomsa.der
keytool -list -v -keystore cacerts > sajjad_cacerts.txt
Posted by Sajjad at 6:41 pm 0 comments
http://magicmonster.com/kb/prg/java/ssl/pkix_path_building_failed.html
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target.
./jdk1.6.0_24/jre/lib/security/cacerts
./jre1.6.0_24/lib/security/cacerts
javax.net.ssl.trustStore
javax.net.ssl.trustStorePassword
keytool -list -v -keystore /path/to/cacerts > java_cacerts.txt
Enter keystore password: changeit
keytool -import -alias example -keystore /path/to/cacerts -file example.der
Posted by Sajjad at 6:28 pm 0 comments
<repositories>
<!-- Repository for ORACLE ojdbc6. -->
<repository>
<id>codelds</id>
<url>https://code.lds.org/nexus/content/groups/main-repo</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0.3</version>
</dependency>
</dependencies>
src:http://stackoverflow.com/questions/1074869/find-oracle-jdbc-driver-in-maven-repository
LENGTH(TRIM(TRANSLATE(TEXT_TO_BE_TESTED, 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+-.0123456789', ' '))) is not null
Posted by Sajjad at 1:17 pm 0 comments
Labels: Oracle
UPDATE table_t t1
SET FIELD_NEW = (SELECT rnk
FROM (SELECT id_val,
row_number() over (partition by GROUPING_COULUMN
order by id_val) rnk
FROM table_t ) t2
WHERE t2.id_val = t1.id_val)
Posted by Sajjad at 8:44 pm 0 comments
Labels: Oracle