Thank you very much..you need single quotes around the dbname though...CREATE TABLE dbHELP ( [name] nvarchar(24) , db_size nvarchar(13) , owner nvarchar(24) , dbid smallint , created char(11) , status varchar(340) , compatibility_level tinyint)GOINSERT INTO dbHELP ([name], db_size, owner, dbid, created, status, compatibility_level)EXEC sp_HelpDBSELECT CHARINDEX('Collation=',Status), CHARINDEX(',',Status,(CHARINDEX('Collation=',Status))), SUBSTRING(Status , CHARINDEX('Collation=',Status)+10 , CHARINDEX(',',Status,(CHARINDEX('Collation=',Status)+10)) - CHARINDEX('Collation=',Status))FROM dbHELP
Brett8-)Hint: Want your questions answered fast? Follow the direction in this linkhttp://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx