Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: huchen
  • Content: Threads
  • Order by date
  1. huchen

    Oracle 10g Express -- Can I drop/create database?

    Hello, I need to drop and create database in Oracle10g Express version. I have to deininstall and install Oracle Express in order to achieve this. Can I drop and create database in Oracle Express? How to do it? Thank you.
  2. huchen

    How to pipe a schema from one database to another?

    Hello, I need to import all objects in "scott" schema from DB1 to DB2, I need all objects, including table definiations, constraints, stored functions/packages and etc, everything in this schema except data. I do not need any data from any table, not a single row. Can I do this in sqlplus? If...
  3. huchen

    How to compare the performance after rewrite a view to a procedure

    Hello, I have a big view which has very complicated busness logic. The cost of the execution plan(explain plan for) is very high. If I rewrite this view to a stored procedure that calculates for each field and store the value to an interim table, I believe it will improve the performance...
  4. huchen

    How can I create a trigger on select

    Hello, I want to check if a table(table_a) will be used in next 2 months and who is using it. Here is what I want to do: create a trigger on select on table_a insert into table_log(sysdate, user,sql_text); But trigger can not be created on select, How can I achieve this? Thank you
  5. huchen

    trigger on create table and modify column name

    Hello, Oracle allow table name length to 30 and column name length to 30. I need to limit the table name and column name size to 27 for any new tables and new columns in my database. Can I write a trigger on create table and new column to check the size? How can I do it? Thank you in advance.
  6. huchen

    how to add a bitmap index with b-tree index

    Hello, I want to add a index to a large table table_1(state_code, customer_num, other_col) I want to add an index like : CREATE BITMAP INDEX IDX_bitmap_1 ON table_1(state_code, customer_num) TABLESPACE base_index ; As you know, state_code is only 52, but this table has billions of rows...
  7. huchen

    SQL/XML

    Hello, I am exploring SQL/XML in 10g. I found this article is very helpful for me: http://www.oracle.com/technology/pub/articles/quinlan-xml.html So I followed the instruction and practice on my local machine(local personal 10g database). It workded fine until I got stuck here: BEGIN...
  8. huchen

    Enterprise Manager Database Control URL

    Hello, I installed Personal Oracle Database 10g Release 10.2.0.1.0 to practice something. after I install the database, I was able to open EM database control from this URL: http://mymachine.COM:1158/em But after I reboot my machine, I got "The page cannot be displayed" error. The database is...
  9. huchen

    ORA-00054: resource busy and acquire with NOWAIT specified

    Hello, I googled "ORA-00054" and found one of the solutions is: "Execute the command without the NOWAIT keyword." Can you tell me where this setting of "NOWAIT" is? I searched my local orant9i\network\ADMIN\ and could not find "NOWAIT" In another words, how can I do this: "Execute the...
  10. huchen

    out join in query

    Hello, Can you please help me understand this out join? Here are 3 tables with columns: t1(key1, c2, c3, exp_date)--this table has 2M rows t2(key2, c2,c3,exp_date)--this table has 0.8M rows t3(key1,key2, c3, c4, exp_date) -- (key1,key2) is primary key, has a little less row than t2 an query...
  11. huchen

    PL/SQL -- what does "=>" mean?

    Hello, I saw this block of code from: http://builder.com.com/5100-6388-5218673.html Could anybody tell me what does "=>" mean? and where I can find more explaination of it? I can not find help from oracle PL/SQL book. Thank you. procedure generate_md5 ( p_username in varchar2...
  12. huchen

    view package body source code

    Hello, I have schema A and B A has packages for all applications. B as a developer can create package in his own schema, and can view source code of A's packages(A.pkg_1). B is not allowed to compile A.pkg_1 what kind of privilege I should give to developer B so he can view source code from...
  13. huchen

    how to update a column daily?

    Hello, I am looking for a simple way to achieve this: I need to run this query at 7:00am daily: update tab_1 set flag ='Y' where modifed_date > sysdate -2; What are the options I have to achieve this? Thank you!
  14. huchen

    unexpected result from --where username like '%_ABC'

    Hello, I want to get a list of login IDs for all developers from DB1 that do not exist in DB2. here is the query I am using: scott@DB1>select username from dba_users where username like '%_DEV' and username not in (select username from...
  15. huchen

    where to check JDBC driver version?

    Hello, Somebody asked me this: What version of JDBC driver do we use to connect to the database? Where should I look to find out the answer? Database is Oracle and application is on BEA server(web application) The more detailed your answer is, the better it will help me. Thank you.
  16. huchen

    how to add a carriage return in select statement

    Hello, I want to add a carriage return in my select statement before "commit;", see query below: ~r~ does not work. This query will return few hundred rows and I want to run it dynamicly. If "commit;" is on same line, the update will fail. Could anybody help? Thanks, select distinct 'update...
  17. huchen

    ORA-06572 -- any bypass to avoid it?

    Hello, I have a funcion sf_a(v_1, v_2 out, v3 out) return number I need to use the return value from sf_a in a view select decode( sf_a(1, 1, 1),1,'Y','N') flag and I got error: ORA-06572: Function sf_a has out arguments How can I use sf_v return value in select? Thanks
  18. huchen

    add check constraint

    Here is my problem: I have table A(code_type, code, description), (A.code_type, A.code) is unique. Another table B(col1, col2, col3) I want to add a constraint on table B to check B.col2 exist in A.code When I run this: alter table B add constraint fk_ab foreign key (col2) references...
  19. huchen

    can not drop a function

    Hello, Here is my problem: I have a function sf_test1: CREATE OR REPLACE FUNCTION scott.sf_test1( id number) return number as cnt number(15, 2) := 0; begin select count(*) into cnt from emp_exp where emp_id = id; return cnt; end; the status of this function is valid. This...
  20. huchen

    how to skip a row in a loop in pl/sql?

    Hello, I want to skip some rows in a for loop, such as: for i in (select col_1, col2 from tab_a) loop if i.col_1 ='A' then continue; end if; end loop; I want to use "continue" to skip a row. I used "continue" and "next", and none of them works. What is the key word for "continue"? Thanks

Part and Inventory Search

Back
Top