 	valid_end_date,
 	invalid_reason
 	)
-SELECT substr(concept_name, 1, 255) concept_name,
+SELECT TRIM(SUBSTR(concept_name, 1, 255)) concept_name,
 	CASE 
 		WHEN displayname IN (
 				'COSMETIC',

	valid_end_date,
	invalid_reason
	)
SELECT SUBSTR(concept_name, 1, 255) AS concept_name,
	'Drug' AS domain_id,
	'NDC' AS vocabulary_id,
	'11-digit NDC' AS concept_class_id,

	valid_end_date,
	invalid_reason
	)
SELECT DISTINCT TRIM(SUBSTR(c.str, 1, 255)) AS concept_name,
	'Drug' AS domain_id,
	'NDC' AS vocabulary_id,
	'11-digit NDC' AS concept_class_id,
