Assuming collate is required, the following 9 results were found.
INTO @ColToProcess WHILE @@FETCH_STATUS = 0 BEGIN SET @SqlToExecute = ' SELECT DISTINCT ' + LTRIM(@ColToProcess) + ' COLLATE ' + @p_UseCollation + ', ''' + LTRIM(@ColToProcess) + ''', COUNT(*) AS Count FROM ' + @p_SearchTable + ' GROUP BY ' +...
Reorder Columns in a Tablehttps://joellipman.com/articles/database/reorder-columns-in-a-table.html
IF NOT EXISTS `Table1` ( `Column1` int(11) NOT NULL AUTO_INCREMENT, `Column3` int(11) NOT NULL, `Column2` varchar(100) COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`Column1`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci...
-- Populate Cursor1 (used to generate final SQL query to run) DECLARE Cursor1 CURSOR FOR SELECT 'SELECT ' + COLUMN_NAME + ' COLLATE Latin1_General_CS_AS AS column_value, ''' + TABLE_SCHEMA + '.' + TABLE_NAME + '.' + COLUMN_NAME + ''' AS column_source...
out the SQL query to copy and paste into your SQL administration software. You can put a distinct on it (not forgetting the collate). This example is expanded in a further article called "Search a database with soundex": /* USING A CURSOR */ DECLARE...
all what we set out to achieve other than it identified the remaining values as having the same SOUNDEX value. Adding the COLLATE option straight after the column that needs to be case-sensitive returned the correct results: SELECT DISTINCT...
DECLARE @i INT; DECLARE @c VARCHAR(2); -- specify reset SELECT @Reset = 1, @i=1, @Ret = ''; IF (UPPER(@Text)=@Text Collate Latin1_General_CS_AI) BEGIN -- cycle through each character, -- if non-alpha, uppercase next alpha character. -- if alpha then...
because it took me so long to work it out. How? UPDATE `table_to_update` a INNER JOIN `table_to_read` b ON a.`CountryName` COLLATE utf8_general_ci LIKE b.`CountryName` COLLATE utf8_general_ci SET a.`ccTLD` = b.`ccTLD`
going to be putting all the articles which document my downloadable products. Please bear with me as I collate all your questions and go into more detail.
// set the collation of the database and any text fields to 'utf8-general-ci' ALTER DATABASE db_name CHARACTER SET latin1 COLLATE utf8-general-ci; // set text fields to utf8 SET NAMES 'utf8'; This does nothing: // convert the foreign character using PHP...