oracle

Strings are appended with special characters when returned from the database

Hi, I am using NHibernate to query an Oracle 8i database. The problem is that all the strings in the returned objects are postfixed with special characters. For e.g. CUSTOMER,ONE������� The nhibernate field type is AnsiString and the Oracle datatype is CHAR(20) and the Character set is CHAR_CS. I am totally new with Oracle so i don't...

Japanese characters in java webapp and oracle

Hi. I want to write a simple java web app that takes japanese characters and stores in db.(Oracle). My server is tomcat. What are the things I need to ensure, rather what all places my encoding should be set correctly? I have UTF-8 in my IDE, and probably database config is also set to UTF-8. Would that be enough? Does my server con...

ORA-0 [BEA][Oracle JDBC Driver] Unhandled sql type

I have a very simple sql query and when i try to execute, i get following error java.sql.SQLException: [BEA][Oracle JDBCDriver]Unhandled sql type at weblogic.jdbc.base.BaseExceptions.createException(Unknown Source) at weblogic.jdbc.base.BaseExceptions.getException(Unknown Source) at ... I have configured weblogic datats...

how to get records from a file to use those records in a select statement?

Hi i have a file that consists of ids. my statement is select * from table_name where id in (?) ? in the statement should have ids.....but those ids are in file. help me please what i have to write in the place of ? symbol without creating table in database cant we done above thing? Thanks in advance ...

How to check for valid oracle table name using sql/plsql

I need to check if a string contains a valid Oracle table name using sql/plsql. The criteria I found for a Oracle table name are these: The table name must begin with a letter. The table name can not be longer than 30 characters. The table name must be made up of alphanumeric characters or the following special characters: $, _, and #....

can we use files located in other server to create external tables?

create table ext_table_dat ( i Number, ) organization external ( type oracle_loader default directory ext_dir access parameters ( records delimited by newline fields terminated by ',' missing field values are null ) location ('$AI_SERIAL/file.dat') ) reject limit unlimited;...

What fields can I update in oracle?

Is there a SQL script I can run in Oracle that will tell me which fields I have permission to Update? EDIT: I've tried these select * from USER_COL_PRIVS_RECD select * from DBA_COL_PRIVS select * from USER_COL_PRIVS_MADE select * from ALL_TAB_PRIVS_MADE select * from ALL_TAB_PRIVS_RECD and the only one that has results is the la...

Oracle string replacement

I have a column in my oracle database which due reasons beyond my control contains a CSV string e.g. Item a,Item b,Item c,Item d I want to run an UPDATE statement to get rid of item c. Thus ending up with Item a,Item b,Item d How can I achieve this ...

How to measure performance of query in oracle

Hi all, I'm new to Oracle db. I have 2 queries which return the same result set. I want to measure the performance of each of them and choose the better one. How do I do that using Oracle SQL developer? I remember reading that certain tools provide stats. Any pointers on how to read these stats? Update: As suggested by Rob Van, I used ...

ORACLE : Materialized view not working when Using LEFT JOIN

I want to create a MATERIALIZED VIEW from a LEFT JOIN of 2 tables. However the following gives me an error: SELECT field1 FROM table_1 a LEFT JOIN table_2 b ON a.field1=b.field2 ORA-12054: cannot set the ON COMMIT refresh attribute for the materialized view However the following works: SELECT field1 FROM tabl...

Oracle get stored procedure last modified date

First, thank you all for your help. I'm trying to locate something similar to MSSQL's sys.procedures.Modify_date in oracle(10g). A little context: We design many stored procedures for use in both oracle and mssql. it's simple enough in mssql to see which stored procedures have been updated (as modify_date will be newer). I've heard th...

Can I prevent long queries in PDO?

Is there any way to make a PDO object throw an error if a query takes too long? I have tried PDO::ATTR_TIMEOUT to no effect. I'd like a way to have a query throw an error if it is running for longer than a certain amount of time. This is not something that I can do in the database, ie, no maintenance jobs running on the db or anything...

Oracle geospatials tutorials?

I am very interested in applications of geospatials. Is there is a good tutorial? I am a beginner at SQL, can I work with geospatials through the .NET environment? What should I download to use spatials? ...

SAS to Oracle ODBC - passing a SAS table INTO the database

Can anyone please advise the syntax for passing a table FROM a SAS library INTO an oracle database? example code below (although obviously the connection to the WORK library cannot be referenced in this way) PROC SQL noprint; connect to ODBC as X (dsn='ALIAS' uid='USER1' pwd='passwd' quote_char=''); exec (CREATE TABLE Test AS SELEC...

assigning data in a new table to an existing foreign key in a for loop

Hi there, I was wondering if there was a way to assign new data in a table to an existing foreign key. For example if i use the following loop to assign randomly generated numbers to columns in the customer table, how would I be able to link cust_id, which I have assigned as a foreign key in the Sales table, with new data created each ti...

trigger for when a sale is made to update the despatch table

I was wondering how I would go about creating a trigger to update the despatch table once a new sale has been inserted into the sales table. I am guessing that the first few lines of the code will look like this: create trigger sale_trig after insert of sale_id on sales ..... But I am not sure how to do the rest. I am using iSQL Plus. ...

How I can Connect to Oracle in ADO.NET Entity Data Model.

Somebody advice me to use Entity Framework here when I asked this question: what is better to build Data layer, Strongly Typed DataSets or Classes So I read a lot of articles about Entity Framework, I understood that Entity Framework designed to be data-source independent and it will support most of the popular DBMSs. I Have vs2008 wit...

QT Database Interface... best place to get started?

I've been asked about using the QT database interface for Oracle. What's a good starting point for investigating this? Do you have any experience with it you can share? ...

nextval sequence for varchar in sql?

HI there, i was wondering if there was a way of making a nextval sequence for a varchar value? I am using iSQL plus, oracle. For e.g. I have a sales table which consists of sale_id, prod_id, cust_name, sale_name. where i insert the data by doing the following: insert into sales select sale_id_seq.nextval, trunc(dbms_random.value(1,100))...

Get table's primary key's name

Hello! I was wondering how can I list the user tables name with its primary key name as the second column? I'm doing half the job but I doesn't know what more to do. select table_name from user_tables ORDER BY (table_name) ASC Does anyone knows how? Thank you ...