Tag: oracle

C# SqlBulkCopy resume on error

I am trying to do a bulk insert of 10 million of rows from Oracle to SQL Server using BulkCopy.WriteToServer(). I have made sure The table columns and data types on both sides are the same. I meant Oracle’s Date data type maps to the Sql Server’s datetime data type. Varchar2 maps to varchar, etc. […]

Varchar to Number in sql

i have written a query in which i am fetching an amount which is a number like ‘50,000’,’80,000′. select Price_amount from per_prices As these values contain ‘,’ these are considered to be varchar.Requirement is to to print these as ‘number’ with ‘,’ that is how can ‘50,000’ be considered as number and not varchar

How can I get a date from SQL Server into Oracle 12c? Dates are being inverted (backwards)

I’m having a real problem getting a date from SQL Server into Oracle while maintaining the correct value. The value in SQL Server looks like: “Apr 28 1969 12:00AM” When I pull this value into a .NET DateTime it looks like: “04/28/1969 12:00AM” When it gets inserted into Oracle it looks like: “28-APR-19” The Oracle […]

SQL Server varbinary(max) to Oracle LONG RAW

I am trying to push binary data from SQL Server to an Oracle LONG RAW column. I have a linked server created on SQL Server that connects to the Oracle server. I have a stored procedure on the Oracle side that I am trying to call from SQL Server. I can’t seem to get the […]

SQL Server Agent 2012 not executing SSIS 2012 package that connects to Oracle but runs OK from SSIS

I’ve been fighting this for a while now, and tried many things, I am finally overwhelmed. I had many SSIS packages in SQL Server 2008 working perfectly, bringing data from SQL, MySQL and Oracle. Then I decided to upgrade to SQL 2012 and the packages won’t run. I created them all again using VS2010 and […]

Query works in Query Designer but not in MS SQL Server Report Builder

While using the Microsoft SQL Server Report Builder, I am able to execute a query in the Query Designer and retreive the result. The query has a where clause on dates. select * from table where DB_timestamp > to_date(:StartDate, ‘mm/dd/yyyy’) and DB_timestamp < to_date(:EndDate, ‘mm/dd/yyyy’) On execution, I get a pop up where I enter […]

recursive query with union in sql server

I want to translate oracle query into sql server. but in sql server, “UNION operator is not allowed in the recursive part of a recursive common table expression ‘TEMP_TAB’.” error is occured. How can I make it? >> ORACLE QUERY SELECT TREE_ID, TREE_NM, TREE_LEV_CD, UP_TREE_ID, TREE_CD, TREE_LRK_RUF_ID, SCE_XRS_SEQ_VL FROM ( SELECT TREE_ID, TREE_NM, TREE_LEV_CD, UP_TREE_ID, […]

Interpreting SSRS parameters

I’m making reports in visual studio for SSRS, I was wondering if I have a parameter which takes multiple values (which end up populating my table) if I could interpret these parameters. I would like to take the input from the user and perform some logic on it (in this case compare it to a […]

How to use extractvalue in SQL Server

I am trying to convert my Oracle query to SQL Server. The query shown below is causing some difficulty when trying to convert EXTRACTVALUE, XMLSEQUENCE, XMLTYPE functions. Can anyone help me learn how to convert these to SQL Server? EXTRACTVALUE(COLUMN_VALUE, ‘pipeline/@name’) NAME FROM TABLE (SELECT XMLSEQUENCE(XMLTYPE(MESSAGE).EXTRACT(‘processEngine’)) FROM NMS_MESSAGES WHERE OBJECT_CODE=’pe_monitor’ AND ID=@WHERE:PARAM:USER_DEF:INTEGER:PARAM_PROCESS_ENGINE@)) INSTANCENAME ,(SELECT EXTRACTVALUE(COLUMN_VALUE, […]

Primary Key – Foreign Key relationship between two different database

This question already has an answer here: Foreign keys in alternate schemas with Oracle? 2 answers

MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.