Index: java/engine/org/apache/derby/iapi/reference/SQLState.java
===================================================================
--- java/engine/org/apache/derby/iapi/reference/SQLState.java	(revision 178809)
+++ java/engine/org/apache/derby/iapi/reference/SQLState.java	(working copy)
@@ -984,7 +984,7 @@
 	String LANG_TOO_MANY_PARAMETERS_FOR_STORED_PROC                    = "54023";
 
 	//following 1 does not match the DB2 sql state, it is a Cloudscape specific behavior which is not compatible with DB2
-	String LANG_OPERATION_NOT_ALLOWED_ON_SESSION_SCHEMA_TABLES = "XCL478.S";
+	String LANG_OPERATION_NOT_ALLOWED_ON_SESSION_SCHEMA_TABLES = "XCL51.S";
 
 	// org.apache.derby.impl.sql.execute.rts
 	String RTS_ATTACHED_TO											   = "43X00.U";
Index: java/engine/org/apache/derby/loc/messages_en.properties
===================================================================
--- java/engine/org/apache/derby/loc/messages_en.properties	(revision 178809)
+++ java/engine/org/apache/derby/loc/messages_en.properties	(working copy)
@@ -688,8 +688,6 @@
 42Z92=repeatable read
 42Z9A=read uncommitted
 
-# Declare global temporary table language stuff. Does not match DB2, specific to Derby behavior
-XCL478.S=The requested function can not reference tables in SESSION schema.
 # Declare global temporary table language stuff. Matches DB2
 428EK=The qualifier for a declared global temporary table name must be SESSION.
 42995=The requested function does not apply to global temporary tables.
@@ -1008,6 +1006,7 @@
 XCL48.S= TRUNCATE TABLE is not permitted on ''{0}'' because unique/primary key constraints on this table are referenced by enabled foreign key constraints from other tables. 
 XCL49.S= TRUNCATE TABLE is not permitted on ''{0}'' because it has an enabled DELETE trigger ({1}).
 XCL50.S=Upgrading the database from a previous version is not supported.  The database being accessed is at version level ''{0}'', this software is at version level ''{1}''.    
+XCL51.S=The requested function can not reference tables in SESSION schema.
 
 
 # Transaction states, matches DB2

