Tag: oracle

Entity Framework – Interact with Orace and SQL Server

I am working on a .NET web api service(with Odata support) to support Mobile client.The service should support both Oracle and SQL server databases, but only one database type will be used at a time, according to which ever database technology client is using. How to create database agnostic data access layer? Dont want to […]

SQL Server Migration Assistant issue

I’ll start off by saying I’m in no way a PL/SQL or T-SQL expert and I only really know the basics but I have been asked to undergo a project to migrate about 1,700 PL/SQL procedure packages to T-SQL. Even if I knew PL/SQL the best way is using an automated tool to at least […]

How can I get certain rows and the “previous” rows from a table that includes a datetime column?

I have two tables, Alpha & Bravo. Bravo has a column id (integer, primary key) and some other columns that are not relevant for this question. Alpha has columns id (integer, primary key), bravo_id (foreign key to table Bravo), special (a single char, null for most rows but has a value for certain important rows), […]

Convert a PL/SQL Stored Procedure in Oracle to Transact-SQL for SQL Server

I have a stored procedure written in PL/SQL for executing in Oracle as: CREATE OR REPLACE PROCEDURE “ZSPLKIMGR” ( businessArea IN TYPES.CHAR10, memberNumber IN TYPES.CHAR35, P_CURSOR IN OUT TYPES.GENCURSOR ) IS BEGIN OPEN P_CURSOR FOR SELECT W03.* , BE.* FROM BEIMGR BE LEFT JOIN W03U999S W03 ON (BE.CRDATTIM = W03.CRDATTIM AND BE.RECORDCD = W03.RECORDCD AND […]

What format string can I use to parse an Oracle TIMESTAMP?

I have the following value stored in an Oracle TIMESTAMP column 05-JAN-18 12.00.00.000000000 AM. I am trying to parse the values and convert them to something that is SQL Server DATETIME friendly. This is what I am trying to do: DateTime result; DateTime.TryParseExact( “05-JAN-18 12.00.00.000000000 AM”, “dd-MMM-yy hh.mm.ss.fffffff tt”, new CultureInfo(“en-US”), DateTimeStyles.None, out result)) except […]

Update query to fix incorrect references between two tables

I have a table task containing e.g. task_id group_id plantype 1 0 1 13 1 0 14 1 0 15 1 0 This indicates tasks 13,14,15 grouped under task 1. Field plantype also indicates if we are dealing with a group or not. I have a second table allocations containing allocations for the tasks (N-1), […]

SQL Server with Oracle SQL Developer 4.1 – can't view tables

I cannot seem to browse the tables on my Azure SQL Server database from within Oracle SQL Developer (Version 4.1 – using jtds-1.3.1.jar plugin). I can connect and perform all queries (inserts, selects, etc.), but when I try to expand it to view the tables, I see this error: An error was encountered performing the […]

Filtering executed SQL queries on application server

First of all, I know this is bad practice but regardless I’m still looking for an answer. In our web application we have a textarea where the user can write SQL to bring in custom data sets and view them in a chart. The way this works is essentially taking the written string and executing […]

How to convert MS SQL Stored Procedure to Oracle

I am stuck with this query. I try to convert but, i new at Oracle 11 g. This is the ms sql stored procedure to convert with Oracle 11 g. CREATE PROCEDURE [dbo].[GetCustomers_Pager] @SearchTerm VARCHAR(100) = ” ,@PageIndex INT = 1 ,@PageSize INT = 10 ,@RecordCount INT OUTPUT AS BEGIN SET NOCOUNT ON; SELECT ROW_NUMBER() […]

Oracle to SQL Server syntax change

I’m having some problems with the following query: select * from ( select inventory.location, inventory.itemnum as itemnum, item.description as itemdesc, inventory.minlevel as olevel , invcost.avgcost from inventory join invcost on inventory.itemnum = invcost.itemnum join item on inventory.itemnum = item.itemnum where inventory.location = ‘KHSTORE’ AND inventory.itemnum BETWEEN ‘1221’ and ‘1221’ and invcost.location = ‘KHSTORE’ ) table1 […]

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