473,734 Members | 2,647 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Converting tables to Upper case

Hello, we've an Oracle transition in the pipeline and want to convert
all our database objects to upper case. Any one got a script or
technique (other than manual) to do it?

Many thanks, Kevin.

Jul 23 '05 #1
2 2115
The two statements below should get you started. If you need to rename
indexes in addition to tables then you can change the u.type in the
WHERE clause of the first statement. Run these statements in every
database in which you need to do this. It will generate the code that
you need to run, so copy and paste the results in the query window and
run that.

I ran both statements and eyeballed the results and they looked ok, but
I have not actually tested this by running the results, so you should
go over it yourself as well.

HTH,
-Tom.

SELECT 'EXEC sp_rename ''[' + u.name + '].[' + o.name + ']'', ''[' +
UPPER(o.name) + ']'''
FROM sysobjects o
INNER JOIN sysusers u ON u.uid = o.uid
WHERE o.type = 'U'

SELECT 'EXEC sp_rename ''[' + u.name + '].[' + t.name + '].[' + c.name
+ ']'', ''[' + UPPER(c.name) + ']'', ''COLUMN'''
FROM sysobjects t
INNER JOIN sysusers u ON u.uid = t.uid
INNER JOIN syscolumns c ON c.id = t.id
WHERE t.type = 'U'

Jul 23 '05 #2
Thanks very much, this works a treat and is a great idea. Apologies
for delay in replying.

kevin.
"Thomas R. Hummel" <to********@hot mail.com> wrote in message news:<11******* *************** @f14g2000cwb.go oglegroups.com> ...
The two statements below should get you started. If you need to rename
indexes in addition to tables then you can change the u.type in the
WHERE clause of the first statement. Run these statements in every
database in which you need to do this. It will generate the code that
you need to run, so copy and paste the results in the query window and
run that.

I ran both statements and eyeballed the results and they looked ok, but
I have not actually tested this by running the results, so you should
go over it yourself as well.

HTH,
-Tom.

SELECT 'EXEC sp_rename ''[' + u.name + '].[' + o.name + ']'', ''[' +
UPPER(o.name) + ']'''
FROM sysobjects o
INNER JOIN sysusers u ON u.uid = o.uid
WHERE o.type = 'U'

SELECT 'EXEC sp_rename ''[' + u.name + '].[' + t.name + '].[' + c.name
+ ']'', ''[' + UPPER(c.name) + ']'', ''COLUMN'''
FROM sysobjects t
INNER JOIN sysusers u ON u.uid = t.uid
INNER JOIN syscolumns c ON c.id = t.id
WHERE t.type = 'U'

Jul 23 '05 #3

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

Similar topics

2
2132
by: ToddT | last post by:
i'm trying to convert names to their proper case (e.g. "todd" -> "Todd") using the following rountine: Private Function ConvertToProperCase(ByVal stringValue As String) As String Dim ci As New System.Globalization.CultureInfo("en-US", False) Dim properCaseValue As String properCaseValue = stringValue.Replace("'", "' ")
10
2862
by: jose.jeria | last post by:
I use the following to convert uppercase to lowercase: translate($queryString, 'ABCDE...', 'abcde...') But how can i convert the case for umlauts? öåä etc
4
13067
by: programmerforhire | last post by:
Hello all, Is there a way to setup an ms-access table so that when I enter text in the 'datasheet' mode, it will automatically be converted tp upper case. Or must I use a Form for this? rex
3
6500
by: Brian Conway | last post by:
How do I convert a field that is filled in to uppercase within the C3 code? I see the ToUpper in there, but how do I get the text box to convert this to upper when you change focus or move to another text box?
8
65121
by: Brian Conway | last post by:
How do I convert a field that is filled in to uppercase within the C3 code? I see the ToUpper in there, but how do I get the text box to convert this to upper when you change focus or move to another text box?
6
12557
by: Manish | last post by:
In my application there is need for only upper case chars.. Currently I am making entry to upper case when user leaves focus of the text control. I want to do some modification here...When user enters any char in small case...during that entry it should convert in upper case... It is very easy in VB6..In VB6 you just need to convert the Ascii value to char ---> then to Ucase ---> then char to Ascii again...this can be done in keypress...
5
10280
by: Nelson | last post by:
In my web form, I am converting all lower case letters to upper case when the user types the characters in the edit boxes. I am achieving that by injecting client side script (onkeyup event) for each text box. However if the user types the characters so fast it may not work.. Also there are some other loopholes in my code. Is there any approach in ASP.Net to make sure whenever the user types lower case, the data will be converted to upper...
1
4489
by: Vish | last post by:
Hi All, I am trying to insert a GUID generated in .NET into my SQL Server tables. I am inserting it into a column of type uniqueidentifier. The GUID generated by ..NET has lower case alphabets in it but after i insert it into the SQL Server tables, all the lower case alphabets get converted into upper case alphabets. This causes problems when i retreive it and compare to the one stored locally in my program. Isn't the GUID case...
1
1753
by: nbowman | last post by:
How do you convert lower case to upper case in the entire Access database, while maintaining data that is in upper case?
0
8776
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
9449
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9236
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
8186
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
6735
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
4550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4809
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2724
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2180
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.