473,405 Members | 2,354 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

quey conversion from oracle to sqlserver?

hi friends,
The below given query is work on oracle.Help me out write same query
on sqlserve i want the same resule.
select * from (select trunc(sysdate) + level from dual
2 connect by level <= 10);

TRUNC(SYS
---------
28-OCT-06
29-OCT-06
30-OCT-06
31-OCT-06
01-NOV-06
02-NOV-06
03-NOV-06
04-NOV-06
05-NOV-06
06-NOV-06

10 rows selected.
Jun 27 '08 #1
1 1177
you need to use the ansi sql syntax, rather then orcale's. in ansi sql
you use common table expressions (CTE) and union all to perform
hierarchical joins. the docs have examples

-- bruce (sqlwork.com)


ravi wrote:
hi friends,
The below given query is work on oracle.Help me out write same query
on sqlserve i want the same resule.
select * from (select trunc(sysdate) + level from dual
2 connect by level <= 10);

TRUNC(SYS
---------
28-OCT-06
29-OCT-06
30-OCT-06
31-OCT-06
01-NOV-06
02-NOV-06
03-NOV-06
04-NOV-06
05-NOV-06
06-NOV-06

10 rows selected.
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Syed Mudussir Husain | last post by:
Hello, I am doing a very large web based database project. Over the period of 5 years, "more than 100, 000 Books" will be stored in a Database along with a LARGE amount of book attributes...
0
by: Mark Townsend | last post by:
Following is a summary of articles spanning a 7 day period, beginning at 23 Feb 2004 05:29:19 GMT and ending at 01 Mar 2004 04:12:14 GMT. Notes ===== - A line in the body of a post is...
2
by: Seung Y. Kim | last post by:
Hi everyone. I am having a big performance issue with my ASP application with Oracle database. The application itself is a very database-generic one, so I can switch from Access to SQLServer...
7
by: Jan van Veldhuizen | last post by:
The UPDATE table FROM syntax is not supported by Oracle. I am looking for a syntax that is understood by both Oracle and SqlServer. Example: Table1: id name city ...
4
by: Dave | last post by:
Hey all, Recently we had a small re-org which combined DBA teams, specifically Oracle and SqlServer. Just wondering if anyone has documentation/presentations, etc that show's how to admin a...
14
by: Sudhesh Nayak | last post by:
Hi, I have an Oracle (8.1) & a SQL Server 2000 database with Production data. There are situations when I need data from both the databases. My first choice was to link Oracle to SQL and run DTS...
5
by: NormaJean Sebastian via DBMonster.com | last post by:
Hi, I almost read all of the "DB2 vs Oracle" thread... The summary I got from that was all databases essentially do the same things, the decision of which one you use primarily depends on...
1
by: lovkeshanand | last post by:
Dear All, I am using the oracle transparent gateway connectivity with sql server using tg4msql,as far as settings are concerned those were set and Connectivity is working Fine, and getting the...
1
by: ravi | last post by:
hi friends, The below given query is work on oracle.Help me out write same query on sqlserve i want the same resule. select * from (select trunc(sysdate) + level from dual 2 connect by level...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.