I'd like to do this but I know this isn't the right syntax:
INSERT INTO
TBL1 SELECT
Col1.ToLower + 's'
FROM
TBL2
Use the SQL LOWER() function if you want to convert a string column to lowercase. This function takes only one argument: the column whose values you want to lowercase. This function is a good choice if your database is case sensitive and you want to select only records matching a particular string.
If you want to display a string in uppercase, use the SQL UPPER() function. This function takes only one argument: the string column that you want to convert to uppercase.
To do a case-insensitive comparison, use the ILIKE keyword; e.g., column ILIKE 'aBc' and column ILIKE 'ABC' both return TRUE for 'abc' . In contrast, MySQL and MS SQL Server have case-insensitive behaviors by default. This means WHERE column = 'abc' returns TRUE for e.g., 'abc' , 'ABC' , or 'aBc' .
All Caps SQL Commands For readability, all SQL commands should be written in uppercase letters. This allows the reader to identify the keywords in the SQL statement and easily determine what the query is executing.
INSERT INTO TBL1 SELECT LOWER(Col1) + 's'
FROM TBL2
Like this:
INSERT INTO TBL1 SELECT LOWER(Col1) + 's'
FROM TBL2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With