clear markdown compare help best fiddles feedback dbanow.uk a leap of faith?
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. 1048191 fiddles created (11051 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;
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE test ALL 7 100.00
 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_BHUVUOOUNFVQONXMSQHU.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)