473,396 Members | 1,914 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,396 software developers and data experts.

db upgrade code

Hi.
There are 3 systems a customer might have:
ancient, old, and new.

I'm trying to write a t-sql script which will be safe to run on any of the 3,
and upgrade appropriately.

unfortunately, I find that if I have a script like this, it won't compile if
running against a new system lacking col1:

if exists (informationschema....columns..)/*missing*/
begin
create table table0 col2 varchar(60)
end
else
if exists (informationschema...columns..)/*ancient*/
begin
alter table add col2 varchar(60)
update table set col2 = col1
alter table drop col1
some other stuff
end
else
if exists (informationschema...columns..)/*old*/
begin
some other stuff
end

Is there someway of writing some code to update correctly using t-sql and
handling this?

thanks
Jeff Kish
May 16 '06 #1
0 1037

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

Similar topics

1
by: DickChristoph | last post by:
Hi I am interested in converting a Access 97 application to VB.Net (well okay rewriting). This would be a VB.Net client with a SQL Server backend, as opposed to my other alternative which would...
4
by: Dave Harney | last post by:
Hi Newsgroup, I'm currently using VS Ver 7.0.9466 with an OS of Server 2000 (domain controller) Ver 5.0.2195 (Build 2195) SP4. I have MSDN Universal and would like to upgrade my development...
7
by: DaVBGuy | last post by:
I'm currently using VB 6 for windows based apps. Should I make the jump to VS.2003 now, or should I wait till (the final) VS.2005 release comes out later this year. If I have not started...
3
by: John | last post by:
Hello, I am trying to figure out how to determine if I have fixed an upgrade warning. If I delete the green text then the upgrade warning goes away. However, I would expect it to come back...
7
by: Abdul-Wahid Paterson | last post by:
Hi, I have had a site working for the last 2 years and have had no problems until at the weekend I replace my database server with a newer one. The database migration went like a dream and I had...
6
by: Terry Bell | last post by:
We've had a very large A97 app running fine for the last seven years. I've just converted to SQL Server backend, which is being tested, but meanwhile the JET based version, running under terminal...
2
by: Jerry Derringer | last post by:
Our company just upgraded to VS 2005 (and by the way, I love it!) I was able to migrate the code for our product from VS2003 to VS2005 with only a few snags, and it's working great now. However...
6
by: Ajith Menon | last post by:
I am working on a project "ABC" which needs to be upgraded from .NET framework 1.1. We are thinking about upgrading it to .NET framework 2.0. The reason for this is that we have some unmanaged...
6
by: ARC | last post by:
I'm almost ready to build an upgrade routine for a commercial app that will need to import data from an existing Access 97 back-end database to an Access 2007 back-end blank database. Ideally, it...
0
by: DKn | last post by:
Hi all, I am trying to do Software upgradation using Win32_Product -Upgrade method in C#.Net. Here is the code. using System; using System.Management; using System.Windows.Forms;
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.