Pages

Monday, December 19, 2011

Good SQL Statements

Sql statement to update classification description with last description in the hierarchy

update CLASSIFICATION set DESCRIPTION = (select SUBSTR( description , LOCATE_IN_STRING( description , '\' , -1 ) + 1) from CLASSSTRUCTURE where CLASSSTRUCTURE.CLASSIFICATIONID=CLASSIFICATION.CLASSIFICATIONID) where DESCRIPTION is null

No comments:

Post a Comment