oracle11g

Data Migration From Oracle To SQL Server

馋奶兔 提交于 2020-01-06 08:16:10
问题 I have an Oracle database in which there is one or more table. I also have blob data, i.e. images are stored, now I would like to move that data to Sql Server database. What is the best way to do this? I would like to test it for one table migration which contains image data in the Oracle database and move it into SQL Server table. How do I test for migrating data from one table from Oracle to SQL Server? But first thing I would like to confirm is that whether Image data moving from Oracle DB

Query Returning value as 0

怎甘沉沦 提交于 2020-01-06 08:00:54
问题 I am trying to execute following PL/SQL script in SQL Developer. The loop should return count of nulls but somehow everytime it is returning 0. set serveroutput on DECLARE --v_count number; v_count_null number; BEGIN execute immediate 'select count(*) from SP_MOSAIX' into v_count; FOR i in (select column_name from all_tab_COLUMNS where table_name = 'SP_MOSAIX') LOOP select count(*) into v_count_null from SP_MOSAIX where i.column_name IS NULL ; dbms_output.put_line(v_count_null); END LOOP; END

Not able to run large dynamic select query in stored procedure

自作多情 提交于 2020-01-06 07:42:06
问题 I have a stored procedure which is executing a dynamic select query. The query string is large. The following is the stored procedure create or replace procedure My_SP ( procRefCursor out sys_refcursor, --My other input variables here ) is dynSqlComplete varchar2(8000) := 'n/a'; begin dynSqlComplete := 'Large query here'; open procRefCursor for dynSqlComplete; end; When I run this sp it shows the following error ORA-00600: internal error code, arguments: [qcscbAddToSelLists], [], [], [], [],

EF4 Linq Oracle11g making queries none case-sensitive

吃可爱长大的小学妹 提交于 2020-01-06 07:19:33
问题 We are moving to EF4 & Linq as our db interface to a Oracle 11g db. The database is setup as case sensitive, but we need to search as case insensitive. In oracle using "UPPER" in the query is potentially very expensive. I have looked at the following options with the indicated results: ChangeEntities.TABLE.Where(x => x.FIELD.Equals(VARIABLE)) generates SQL Where clause: WHERE TABLE.FIELD = VARIABLE --------------------- ChangeEntities.TABLE.Where(x => x.FIELD.Equals(VARIABLE.ToUpper()))

Select subquery that return multiple rows as string (one column) in table (Oracle SQL)

和自甴很熟 提交于 2020-01-06 06:54:41
问题 Example I have Product Data: Product_No Column1 Column2 ... ColumnX 1 A 10 2 B 11 3 C 12 And for column X I need single data row from this table Inventory: Product_No Inventory_No ColumnA ColumnB ColumnC 1 1 ABC 20 30 1 2 DDD 30 50 2 1 EFG 60 70 2 2 CDE 99 100 3 3 EFF 120 30 And the result for column x should be Product_No Column1 Column2 ... ColumnX 1 A 10 ABC-20-30,DDD-30-50 2 B 11 EFG-60-70,CDE-99-100 3 C 12 EFF-120-30 How to return that value without altering the main query join and from,

How to write SQL statement when use Method in object relational database

孤街浪徒 提交于 2020-01-06 06:43:05
问题 I am trying to create a small database of bank employees using method in oracle 11g, so at the end I can fetch values of those employees who are entitle for the awards at the end of the year: Gold medals for employees who have been working at the bank for more than 12 years and supervised more than 6 staff; silver medals for employees who have been working at the bank for more than 8 years and supervised more than 3 staff; bronze medals for employees who have been working at the bank for more

specific row number with all the fields

妖精的绣舞 提交于 2020-01-06 05:27:09
问题 I have HR oracle schema and in that, I want to display all the fields of employees who have a 3rd highest salary. Here is what I have written so far but it does not return anything. select * from ( select * from HR.EMPLOYEES order by HR.EMPLOYEES.SALARY DESC) where rownum=3 I want to get this result without using any functions like dense_rank() etc. Want to keep the query simple. But if someone can use analytic function and can explain its working then I can get the idea of its use so far I

How to execute the jobs in oracle? [closed]

百般思念 提交于 2020-01-06 05:25:08
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 days ago . I have a simple job which is: BEGIN DBMS_SCHEDULER.CREATE_JOB ( job_name => 'offc.My_job1', job_type => 'STORED_PROCEDURE', job_action => 'offc.MYPROC', start_date => sysdate, repeat_interval => 'FREQ=SECONDLY;INTERVAL=5', end_date => '02-Jan-2020 10:29:05 PM', auto_drop => FALSE, comments => 'My new job'); END;

Duplication employee in table due to switch in department

回眸只為那壹抹淺笑 提交于 2020-01-06 04:50:08
问题 I have a problem, my company has a customer satisfaction program which fetches a lot of data from different tables in our database systems. The problem is I want to show customer satisfaction percentage of a specific department only, so only employees from this specific department are revealed. The problem is in the table that i fetch the employees from, there are duplicates of the same employee if they have switched department, so if they worked in 1 department 1 year ago, and moved to

Add a column to a table with check constraint SQL

白昼怎懂夜的黑 提交于 2020-01-06 03:16:06
问题 I want to add a column to a table, then add a check constraint to make sure its greater than 0. I cant seem to get this to run in oracle sl developer. Alter TABLE store101 add column Base_salary Number(7,2) constraint store101_Base_salary_ck check (Base_salary > 0); Error report - SQL Error: ORA-00904: : invalid identifier 00904. 00000 - "%s: invalid identifier" 回答1: There is no ADD COLUMN clause in ALTER TABLE syntax. It's just ADD . ALTER TABLE store101 ADD Base_salary NUMBER(7, 2) -- there