-3
votes
1answer
1k views

Single query to copy data from 3 tables into a single empty table

In an interview today, I was asked if I could write a single query to copy data from 3 source tables to an empty destination table. I started saying "I will use a temp table or table variables", ...
3
votes
1answer
555 views

SQL Server to Oracle Export - Data conversion error

I have a rather weird problem with exporting a bunch of tables from SQL Server 2005 to Oracle database. I have SQL Agent job that deletes Oracle tables, recreates them and then exports the data using ...
6
votes
5answers
5k views

Auto-Commit in SQL Server and Oracle

When I worked on Oracle 8 many years before, I used to execute COMMIT command manually after each bulk INSERT. In SQL Server, Auto-Commit is ON by default which has advantages as well as hazards. I ...
2
votes
2answers
346 views

How to query status changes in time series?

Given create table rating ( ID int identity(1,1) primary key, PersonID int, Ratingdate date, rating varchar(2) ); insert into rating values ( 1, '2010-08-04' , 'A3'); insert ...
8
votes
2answers
2k views

How to migrate SQL Server Stored Procedures using temporary tables or table variables to Oracle?

C# developer encouraged by management to write SQL Server stored procedures often produce procedures like this create table #t1 (...); insert into #t1 Select ... from table_a where ...; insert into ...