oracle10g

Configuring Informatica Repository with Oracle 10g [Oracle not connecting]

风流意气都作罢 提交于 2019-12-05 05:04:13
Oracle Details:- Oracle 10g Enterprise Edition Host running XP x32 I use scott tiger for logging with SQL* Plus . I dont provide any HOST STRING . How can i setup Oracle to accept Host String ? i am asking this because i guess the problem is related to this IP : 192.168.17.132 , Hostname : vmxp1 tnsnames.ora file:- GLOBALDB = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = vmxp1)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = globaldb) ) ) EXTPROC_CONNECTION_DATA = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC)) ) (CONNECT_DATA = (SID =

ORACLE SQL get difference of two values retrieved from 2 select statements

烈酒焚心 提交于 2019-12-05 04:37:59
We have 2 very simple SELECT statements: SELECT value from table where date between DATE1 and DATE2 SELECT value from table where date between DATE3 and DATE4 We need a way to write a single SQL statement which will get the difference of the "value" that is returned from these two SQL statements. We tried the following but it was not successful: SELECT value from table where date between DATE1 and DATE2 minus SELECT value from table where date between DATE3 and DATE4 Any suggestion is highly appreciated. Untested but should work: SELECT (SELECT value from table where date between DATE1 and

Getting SQLPlus to spool out Unicode characters, are being output as?

佐手、 提交于 2019-12-05 04:37:24
I am attempting to get Oracle sqlplus (10.2) to spool out Unicode data on a Linux machine. I have found several discussions of this issue, but no clear answers, other than to check locale settings and set NLS_LANG to AL32UTF8. All locale info is set to "en_US.UTF-8", I'll post the full output upon request. The OS (vi, etc.), will recognize and accept Unicode characters without issue. However, when using sqlplus, all non-ASCII characters are changed to ? characters. The Oracle DB has NLS_CHARACTERSET set to AL32UTF8, and NLS_NCHAR_CHARACTERSET set to AL16UTF16. Am I missing some setting or

Does Oracle's “date'[yyyy-mm-dd]'” literal always use the yyyy-mm-dd pattern?

给你一囗甜甜゛ 提交于 2019-12-05 04:19:41
Rephrased, given I use date like so: date'2010-04-10' , could the outcome be anything but April 10th 2010 (e.g. October 4th 2010)? UPDATE I hear what you, and the docs, say. But... When a batch job runs, with hard-coded date'yyyy-mm-dd':s, it fails for some (non-deterministic) calculations. Running the failing SQL statements in PL/SQL Developer never yields the same, incorrect, value. First, I ran the same calculations (hundreds of thousands) with the date'' date literals replaced with the to_date('', '') function, and everything worked just fine. Then, I used NHibernate and its LINQ provider,

Use regexp_instr to get the last number in a string

亡梦爱人 提交于 2019-12-05 04:18:22
If I used the following expression, the result should be 1. regexp_instr('500 Oracle Parkway, Redwood Shores, CA','[[:digit:]]') Is there a way to make this look for the last number in the string? If I were to look for the last number in the above example, it should return 3. If you were using 11g, you could use regexp_count to determine the number of times that a pattern exists in the string and feed that into the regexp_instr regexp_instr( str, '[[:digit:]]', 1, regexp_count( str, '[[:digit:]]') ) Since you're on 10g, however, the simplest option is probably to reverse the string and

How is my id being generated with JPA using Hibernate with the Oracle 10g dialect?

旧时模样 提交于 2019-12-05 04:15:06
I have some code: @Id @SequenceGenerator(name = "SOMETHING_SEQ") @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SOMETHING_SEQ") @Column(name = "SOMETHING", nullable = false) private Long id; How is hibernate providing my id? I see in my database there a single sequence named 'hibernate_sequence' and no other hibernate 'special tables'. Actually, here your SOMETHING_SEQ is the name of sequence you configured somewhere in your hibernate config. And hibernate_sequence is the sequence name in the database. In configuration it would be looking something like below, <sequence

GROUP BY ignoring an attribute

最后都变了- 提交于 2019-12-05 03:13:33
for example i have this table: itemgroup | description | price A, a, 10 A, b, 12 A, c, 14 B, g, 11 B, h, 16 now i want to select the rows with the highest price in one group like this: A, c, 14 B, h, 16 The SQL query (is fully functional) wich gets me near this is: SELECT itemgroup, MAX( price ) FROM table GROUP BY itemgroup A, 14 B, 16 By trying this I get an "not a GROUP BY expression"-error: SELECT itemgroup, description, MAX( price ) FROM table GROUP BY itemgroup I need something like this pseudo query: SELECT itemgroup, IGNORE( description), MAX( price ) FROM table GROUP BY itemgroup I

SQL combine multiple identifiers to create a group id for duplicate records

本秂侑毒 提交于 2019-12-05 02:15:20
问题 I'm working on a problem in Oracle that I'm struggling to solve 'elegantly'. I have a data extract with three different identifiers: A, B, C Each identifier may appear in more than one row, and each row may have one or more of these three identifiers (i.e the column is populated or null). I want to be able to group all records that have any combination of either A, B or C in common and assign them the same group id. Extract table showing what the eventual groups should be: Rownum | A | B | C

Oracle column Alias - from keyword not found where expected

眉间皱痕 提交于 2019-12-05 01:17:36
SELECT col1 'COLUMN 1' FROM TABLENAME I am getting an error 'from keyword not found where expected' How can you give column alias in Oracle 10g some examples are appreciated Shepherdess Use double quotes: SELECT col1 "COLUMN 1" FROM TABLENAME Shepherdess is correct - you can't use single quotes here. If the alias doesn't have spaces, you could just type the name without any quotes: SELECT col1 column1 FROM TABLENAME Single quotes is not allowed here .Either you have to use double quotes or not quots between column1.Careful about column1 because it doesn't supported any spaces between column1.

How to store an array of bytes in Oracle?

妖精的绣舞 提交于 2019-12-04 23:26:54
I want to store a short array of 64 bytes in Oracle database (a password hash). I thought char(64 byte) is what I need, but it seems like it doesn't work. In Microsoft SQL, I use binary and varbinary types. What type do I need to use in Oracle? Every example I've found uses blob to store binary data, but I suppose blob is intended only for large objects, not for fixed size short arrays. When updating the data, is the code like this appropriate: byte[] passwordHash = GenerateHash(); using (OracleCommand updateHash = new OracleCommand("update A set passwordHash = :hash where EntryId = :id",