473,836 Members | 1,990 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Migrating from SQL Server

I'm migrating a huge application wrote for sql server, this software
offers the option for al user to write their own reports. The report
editor was developed many years ago, and it uses the TransactSQL
native syntax for LEFT OUTER JOINS (*=).
The problem is, that syntax obtains diferents data sets than the ANSI
form (FROM T1 LEFT OUTER JOIN T2).

Sample:
Consider that the t3.c column does not contains the 999 value

When execute this sentence:

Select * from T1, T2 LEFT OUTER JOIN T3 ON T2.C = T3.C where T1.B =
T2.B and t3.c = 999

You will obtain
A B C B C D
C D E
----------- ----------- ----------- ----------- -----------
----------- ----------- ----------- -----------

(0 row(s) affected)

but, if you write it in the native transactsql syntax:

Select * from T1,T2,T3 where T1.B=T2.B and T2.C*=T3.C and t3.c = 999

you will obtain

A B C B C D
C D E
----------- ----------- ----------- ----------- -----------
----------- ----------- ----------- -----------
1 1 1 1 1 1
NULL NULL NULL
2 2 2 2 2 2
NULL NULL NULL

(2 row(s) affected)

So there is an inconsitency in the data set, but i HAVE to preserve
this behavior.

Have anyone any idea on what i have to do on DB2 to obtain the same
result?

Thanks
Nov 12 '05 #1
1 1947
pa***@cine.com (Pablo Etcheverry) wrote in message:
I'm migrating a huge application wrote for sql server, this software
offers the option for al user to write their own reports. The report
editor was developed many years ago, and it uses the TransactSQL
native syntax for LEFT OUTER JOINS (*=).
The problem is, that syntax obtains diferents data sets than the ANSI
form (FROM T1 LEFT OUTER JOIN T2).

Sample:
Consider that the t3.c column does not contains the 999 value

When execute this sentence:

Select * from T1, T2 LEFT OUTER JOIN T3 ON T2.C = T3.C where T1.B =
T2.B and t3.c = 999

You will obtain
A B C B C D
C D E
----------- ----------- ----------- ----------- -----------
----------- ----------- ----------- -----------

(0 row(s) affected)

but, if you write it in the native transactsql syntax:

Select * from T1,T2,T3 where T1.B=T2.B and T2.C*=T3.C and t3.c = 999

you will obtain

A B C B C D
C D E
----------- ----------- ----------- ----------- -----------
----------- ----------- ----------- -----------
1 1 1 1 1 1
NULL NULL NULL
2 2 2 2 2 2
NULL NULL NULL

(2 row(s) affected)

You should warite predicate "t3.c = 999" in ON clause. Like this:
Select *
from T1
, T2
LEFT OUTER JOIN
T3
ON T2.C = T3.C
and t3.c = 999
where T1.B = T2.B

Reason:
If you wrote the predicate in WHERE clause, the condition will be
applied for JOINed result.
For your sample:
After JOINed tables you will get 2 rows with t3.c IS NULL.
Predicate "t3.c = 999" will be applied for this result. Both rows
couldn't satisfy the condition, then they will be removed from the
final result.
Nov 12 '05 #2

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

Similar topics

0
1785
by: steve | last post by:
I am having huge problems migrating large db’s from one server to another. I use phpmyadmin to dump the data into a file, and then migrate it to my production server. Then I try to use this: mysql dbname < filename but if the tables are too large, it simply does not work. So I tried the following two work-arounds, which work but are tedious. Is there a nicer way to do it: Solution A: Create a dump file with subset of all the...
2
1940
by: Serdar Yegulalp | last post by:
I'm in the process of migrating a lot of data (millions of rows, 4GB+ of data) from an older SQL Server 7.0 database to a new SQL Server 2000 machine. Time is not of the essence; my main concern during the migration is that when I copy in the new data, the new database isn't paralyzed by the amount of bulk copying being one. For this reason, I'm splitting the data into one-month chunks (the data's all timestamped and goes back about 3...
2
1440
by: lcifers | last post by:
First off, sorry if my cross posting offends anyone. I'm posting this in Access and SQL Server groups - not sure which one is appropriate. I have a relatively simple ASP.NET/VB.NET application that is now hitting an Access 2000 database over an intranet. We have to migrate the database to SQL Server 7. My experience with ASP.NET is pretty limited and my experience with SQL Server is nonexistent. We have an MSDN subscription, so I went...
10
2163
by: JDS | last post by:
Hi all. I don't know if this is possible, and if it is, whether it needs to be done within Apache configuration or PHP configuration, but here goes: I am migrating my web server to another machine. In fact, it is two machines -- one for the web server itself, and one as a data server for user home directories and MySQL. The users' home dirs will be mounted on the web server as NFS mounts. Now, the original, current, configuration...
3
1834
by: BobRoyAce | last post by:
I would really appreciate recommendations for sources of materials on migrating ASP applications to ASP.NET (books, URL's, etc.). Also, is there a magazine that is particularly good for .NET stuff. I am just starting my journey into the .NET world, moving from a pure ASP one.
4
2633
by: Collin Peters | last post by:
I have searched the Internet... but haven't found much relating to this. I am wondering on what the best practices are for migrating a developmemnt database to a release database. Here is the simplest example of my situation (real world would be more complex). Say you have two versions of your application. A release version and a development version. After a month of developing you are ready to release a new version. There have...
0
1692
by: wingtong | last post by:
Our Deltek accounting software will be migrating from a Jet database to a SQL express database. In the past, when using the Jet database, I have been able to make a copy of the JET database to my local c-drive, manipulate the database outside of the Deltek accounting software by using MSAccess,and copy the JET database file back onto the server (while no one is working on it) (this is a requirement for various reasons) Once we migrate the Jet...
13
2449
by: Matt Fielder | last post by:
First off, if this is better posted in another group that qualifies as a manged group, please let me know. I currently have an application written in VB.Net using MSDE as the database. Current install is via InstallShield. As I've just found out that MSDE is not supported under Vista, I need to migrate to SQLExpress. I am also potentially interested in migrating to using an installer built in Visual Studio. I have a few questions:
0
1186
by: chowdhp | last post by:
Hi, I am trying to migrate our server MSSQL2000 to MSSQL2005 and getting the following errors. 1. When I tried to restore the Master DB in the test server(single user mode) from a backup file it says version mismatch. I cannot detach and attach the master database as it is in the production server! 2. While migrating the DTS I got the following error: "Index was out of range. Must be non-negative and less than the size of the...
64
4616
by: John | last post by:
Hello there, Im cursing my place of employment...and its taken me a month to realise it... The scenario: Ive just stepped into a role to migrate an access database to VB.Net. The access database runs on terminal services and supports approximatly 25-30 users. It is crapping out big time, corrupted data, changes to the front end are difficult for someone unfamiliar with the system (me), the table structure is bad...really bad....there is...
0
9656
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10526
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10570
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10240
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9355
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7772
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6972
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4438
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3100
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.