clear markdown compare help donate or buy diddy dollings comments/suggestions/bugs a leap of faith? bible365
clear markdown donate comments/suggestions/bugs a leap of faith? bible365 diddy dollings
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 710067 fiddles created (14289 in the last week).

CREATE TABLE test ( -- address_id INTEGER IDENTITY(1,1) PRIMARY KEY, address_1 VARCHAR(10), address_2 VARCHAR(10), address_3 VARCHAR(10), address_4 VARCHAR(10), address_5 VARCHAR(10) )
 hidden batch(es)


INSERT INTO test (address_1, address_2, address_3, address_4, address_5) VALUES ('AAA , ', 'BBB,', 'CCC', 'DDD', 'EEE'), (NULL, 'BBB', 'CCC', 'DDD', 'EEE'), (NULL, 'AAAA,', NULL, 'DDD,', 'EEE'), ('AAAA,', 'YYY,', NULL, NULL, NULL), (NULL, NULL, 'XXX,', NULL, 'EEE'), ('AAA', NULL, NULL, NULL, 'EEE'), ('AAA', NULL, NULL, NULL, NULL);
 hidden batch(es)


EXPLAIN EXTENDED SELECT * FROM test;
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT * FROM test' at line 2
 hidden batch(es)


SELECT ISNULL( STUFF( CONCAT ( ', ' + NULLIF(REPLACE(address_1, ',', ''), ''), ', ' + NULLIF(REPLACE(address_2, ',', ''), ''), ', ' + NULLIF(REPLACE(address_3, ',', ''), ''), ', ' + NULLIF(REPLACE(address_4, ',', ''), ''), ', ' + NULLIF(REPLACE(address_5, ',', ''), '') ), 1, 2, '' ), '' ) AS "full_address" FROM test;
Incorrect parameter count in the call to native function 'ISNULL'
 hidden batch(es)


SELECT PATINDEX('%X%', address_1 ) AS x FROM test;
FUNCTION fiddle_MNFCGVEAZUJXEGGOIQIT.PATINDEX does not exist
 hidden batch(es)


SELECT address_1 AS a1, COALESCE(REPLACE(address_1, ',', ''), ' ') AS r1 FROM test ORDER BY address_id;
Unknown column 'address_id' in 'order clause'
 hidden batch(es)