Jump to content

SQLite Set Column Uppercase


seadoggie01
 Share

Recommended Posts

This seems very strange, but I can't get it to work. I have this SQL which I expected to update all my rows to uppercase:

UPDATE test_vendors
SET name = UPPER(name)
WHERE name != UPPER(name) COLLATE NOCASE;

I've tried the above and the first two lines of the above, but every time I check the table again, the name is still lowercase.

I tried wiping the table and inserting from the non-test table as well, but no rows are inserted:

INSERT INTO test_vendors
    SELECT [...], UPPER(name), [...]
    FROM vendors;

(The names are going to be matched against the IRS database which only checks capital letters anyways, so capitalization really doesn't matter)

What am I missing?

Edited by seadoggie01

All my code provided is Public Domain... but it may not work. ;) Use it, change it, break it, whatever you want.

Spoiler

My Humble Contributions:
Personal Function Documentation - A personal HelpFile for your functions
Acro.au3 UDF - Automating Acrobat Pro
ToDo Finder - Find #ToDo: lines in your scripts
UI-SimpleWrappers UDF - Use UI Automation more Simply-er
KeePass UDF - Automate KeePass, a password manager
InputBoxes - Simple Input boxes for various variable types

Link to comment
Share on other sites

Looks like it was my own fault... I created the table to keep the name column unique, but it didn't check different cases. When I ran the SQL, it tried to update the names, but there was already a capitalized name, so it failed, but without an error in AutoIt.

Thanks for the help though Nine :)

All my code provided is Public Domain... but it may not work. ;) Use it, change it, break it, whatever you want.

Spoiler

My Humble Contributions:
Personal Function Documentation - A personal HelpFile for your functions
Acro.au3 UDF - Automating Acrobat Pro
ToDo Finder - Find #ToDo: lines in your scripts
UI-SimpleWrappers UDF - Use UI Automation more Simply-er
KeePass UDF - Automate KeePass, a password manager
InputBoxes - Simple Input boxes for various variable types

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...