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. 2 2111
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'
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' This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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("'", "' ")
|
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
|
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
|
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?
|
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?
| |
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...
|
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...
|
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...
|
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?
|
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,...
|
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...
| |
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,...
|
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...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |