You are on page 1of 27

------------------------------ Commands Entered -----------------------------create database data1; -----------------------------------------------------------------------------create database data1 DB20000I The CREATE DATABASE command completed

successfully. ------------------------------ Commands Entered -----------------------------create table table1; -----------------------------------------------------------------------------create table table1 DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: SQL1024N A database connection does not exist. SQLSTATE=08003 SQL1024N A database connection does not exist. Explanation: There is no connection to a database. Other SQL statements cannot be processed unless an SQL CONNECT was previously executed. The command cannot be processed. User response: If the error occurred when disconnecting from the database, continue processing. If the error occurred on another SQL statement, issue an SQL CONNECT statement and resubmit the command or statement. sqlcode: -1024 sqlstate: 08003

------------------------------ Commands Entered -----------------------------connect database data1; -----------------------------------------------------------------------------connect database data1 SQL0104N An unexpected token "database" was found following "CONNECT". Expected tokens may include: "END-OF-STATEMENT". SQLSTATE=42601 SQL0104N An unexpected token "database" was found following "CONNECT". Expecte d tokens may include: "END-OF-STATEMENT". Explanation: A syntax error in the SQL statement or the input command string for the SYSPROC.ADMIN_CMD procedure was detected at the specified token following the text "<text>". The "<text>" field indicates the 20 characters of the SQL statement or the input command string for the SYSPROC.ADMIN_CMD procedure that preceded the token that is not valid. As an aid, a partial list of valid tokens is provided in the SQLERRM field of the SQLCA as "<token-list>". This list assumes the statement is correct to that point. The statement cannot be processed. User response:

Examine and correct the statement in the area of the specified token. sqlcode: -104 sqlstate: 42601

------------------------------ Commands Entered -----------------------------connect to DATA1 ; -----------------------------------------------------------------------------connect to DATA1 Database Connection Information Database server SQL authorization ID Local database alias = DB2/NT 9.7.0 = MIDHUN = DATA1

A JDBC connection to the target has succeeded. ------------------------------ Commands Entered -----------------------------connect to sample ; -----------------------------------------------------------------------------connect to sample Database Connection Information Database server SQL authorization ID Local database alias = DB2/NT 9.7.0 = MIDHUN = SAMPLE

A JDBC connection to the target has succeeded. ------------------------------ Commands Entered -----------------------------connect to data1; -----------------------------------------------------------------------------connect to data1 Database Connection Information Database server SQL authorization ID Local database alias = DB2/NT 9.7.0 = MIDHUN = DATA1

A JDBC connection to the target has succeeded. ------------------------------ Commands Entered -----------------------------create table table1(name varchar(25),add varchar(28),religion varchar(25),city v archar(25)); -----------------------------------------------------------------------------create table table1(name varchar(25),add varchar(28),religion varchar(25),city v archar(25)) DB20000I The SQL command completed successfully. ------------------------------ Commands Entered -----------------------------select * from table1; ------------------------------------------------------------------------------

Results for a single query are displayed on the Query Results tab. 0 row(s) returned successfully. ------------------------------ Commands Entered -----------------------------insert into table1 values('a','b','c','d'); -----------------------------------------------------------------------------insert into table1 values('a','b','c','d') DB20000I The SQL command completed successfully. ------------------------------ Commands Entered -----------------------------insert into table1 values('u','v','w','x'); -----------------------------------------------------------------------------insert into table1 values('u','v','w','x') DB20000I The SQL command completed successfully. ------------------------------ Commands Entered -----------------------------select * from table1; -----------------------------------------------------------------------------Results for a single query are displayed on the Query Results tab. 2 row(s) returned successfully. ------------------------------ Commands Entered -----------------------------create table table2(name varchar(25),bank varchar(25)); -----------------------------------------------------------------------------create table table2(name varchar(25),bank varchar(25)) DB20000I The SQL command completed successfully. ------------------------------ Commands Entered -----------------------------insert into values('a','g'); -----------------------------------------------------------------------------insert into values('a','g') DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: SQL0104N An unexpected token "'a'" was found following "insert into values(". Expected tokens may include: "<values>". SQLSTATE=42601 SQL0104N An unexpected token "'a'" was found following "insert into values(". Expected tokens may include: "<values> ". Explanation: A syntax error in the SQL statement or the input command string for the SYSPROC.ADMIN_CMD procedure was detected at the specified token following the text "<text>". The "<text>" field indicates the 20 characters of the SQL statement or the input command string for the SYSPROC.ADMIN_CMD procedure that preceded the token that is not valid. As an aid, a partial list of valid tokens is provided in the SQLERRM field of the SQLCA as "<token-list>". This list assumes the statement is correct to that point. The statement cannot be processed. User response: Examine and correct the statement in the area of the specified token. sqlcode: -104 sqlstate: 42601

------------------------------ Commands Entered -----------------------------insert into table2 values('a','g'); -----------------------------------------------------------------------------insert into table2 values('a','g') DB20000I The SQL command completed successfully. ------------------------------ Commands Entered -----------------------------insert into table2 values('j','k'); -----------------------------------------------------------------------------insert into table2 values('j','k') DB20000I The SQL command completed successfully. ------------------------------ Commands Entered -----------------------------select * from table2; -----------------------------------------------------------------------------Results for a single query are displayed on the Query Results tab. 2 row(s) returned successfully. ------------------------------ Commands Entered -----------------------------select name from table1,table2; -----------------------------------------------------------------------------select name from table1,table2 SQL0203N A reference to column "NAME" is ambiguous. SQLSTATE=42702 SQL0203N A reference to column "NAME " is ambiguous. Explanation: The column "<name>" is used in the statement and there is more than one possible column to which it could refer. This could be the result of: * two tables specified in a FROM clause that have columns with the same name * the ORDER BY clause refers to a name that applies to more than one column in the select list * a reference to a column from the subject table in a CREATE TRIGGER statement does not use the correlation name to indicate if it refers to the old or new transition variable. The column name needs further information to establish which of the possible table columns it is. The statement cannot be processed. User response: Add a qualifier to the column name. The qualifier is the table name or correlation name. A column may need to be renamed in the select list. sqlcode: -203 sqlstate: 42702

------------------------------ Commands Entered ------------------------------

select name table1.name from table1,table2; -----------------------------------------------------------------------------select name table1.name from table1,table2 SQL0104N An unexpected token ".name" was found following "select name table1". Expected tokens may include: "<space>". SQLSTATE=42601 SQL0104N An unexpected token ".name" was found following "select name table1". Expected tokens may include: "<space> ". Explanation: A syntax error in the SQL statement or the input command string for the SYSPROC.ADMIN_CMD procedure was detected at the specified token following the text "<text>". The "<text>" field indicates the 20 characters of the SQL statement or the input command string for the SYSPROC.ADMIN_CMD procedure that preceded the token that is not valid. As an aid, a partial list of valid tokens is provided in the SQLERRM field of the SQLCA as "<token-list>". This list assumes the statement is correct to that point. The statement cannot be processed. User response: Examine and correct the statement in the area of the specified token. sqlcode: -104 sqlstate: 42601

------------------------------ Commands Entered -----------------------------select table1.name from table1,table2; -----------------------------------------------------------------------------Results for a single query are displayed on the Query Results tab. 4 row(s) returned successfully. ------------------------------ Commands Entered -----------------------------select * from table1,table2; -----------------------------------------------------------------------------Results for a single query are displayed on the Query Results tab. 4 row(s) returned successfully. ------------------------------ Commands Entered -----------------------------insert into table2 values('u','l'); -----------------------------------------------------------------------------insert into table2 values('u','l') DB20000I The SQL command completed successfully. ------------------------------ Commands Entered -----------------------------select * from table1,table2; -----------------------------------------------------------------------------Results for a single query are displayed on the Query Results tab. 6 row(s) returned successfully.

------------------------------ Commands Entered -----------------------------select table1.name,table2.bank from table1,table2; -----------------------------------------------------------------------------Results for a single query are displayed on the Query Results tab. 6 row(s) returned successfully. ------------------------------ Commands Entered -----------------------------select table2.name, table2.bank from table2; -----------------------------------------------------------------------------Results for a single query are displayed on the Query Results tab. 3 row(s) returned successfully. ------------------------------ Commands Entered -----------------------------insert into table1 values('j','m','n','r'); -----------------------------------------------------------------------------insert into table1 values('j','m','n','r') DB20000I The SQL command completed successfully. ------------------------------ Commands Entered -----------------------------select *from table1,table2; -----------------------------------------------------------------------------Results for a single query are displayed on the Query Results tab. 9 row(s) returned successfully. ------------------------------ Commands Entered -----------------------------select * from table1,table2 where table1.name=table2.name; -----------------------------------------------------------------------------Results for a single query are displayed on the Query Results tab. 3 row(s) returned successfully. ------------------------------ Commands Entered -----------------------------select table2.bank,table1.religion where table2.name=table1.name; -----------------------------------------------------------------------------select table2.bank,table1.religion where table2.name=table1.name SQL0104N An unexpected token "table2" was found following "able1.religion where". Expected tokens may include: "INTO". SQLSTATE=42601 SQL0104N An unexpected token "table2" was found following "able1.religion where ". Expected tokens may include: "INTO ". Explanation: A syntax error in the SQL statement or the input command string for the SYSPROC.ADMIN_CMD procedure was detected at the specified token following the text "<text>". The "<text>" field indicates the 20 characters of the SQL statement or the input command string for the SYSPROC.ADMIN_CMD procedure that preceded the token that is not valid. As an aid, a partial list of valid tokens is provided in the SQLERRM field of the SQLCA as "<token-list>". This list assumes the statement is correct to that point. The statement cannot be processed. User response:

Examine and correct the statement in the area of the specified token. sqlcode: -104 sqlstate: 42601

------------------------------ Commands Entered -----------------------------select from table2.bank,table1.religion where table2.name=table1.name; -----------------------------------------------------------------------------select from table2.bank,table1.religion where table2.name=table1.name SQL0104N An unexpected token "." was found following "select from table2". Expected tokens may include: "FROM". SQLSTATE=42601 SQL0104N An unexpected token "." was found following "select from table2". Ex pected tokens may include: "FROM ". Explanation: A syntax error in the SQL statement or the input command string for the SYSPROC.ADMIN_CMD procedure was detected at the specified token following the text "<text>". The "<text>" field indicates the 20 characters of the SQL statement or the input command string for the SYSPROC.ADMIN_CMD procedure that preceded the token that is not valid. As an aid, a partial list of valid tokens is provided in the SQLERRM field of the SQLCA as "<token-list>". This list assumes the statement is correct to that point. The statement cannot be processed. User response: Examine and correct the statement in the area of the specified token. sqlcode: -104 sqlstate: 42601

------------------------------ Commands Entered -----------------------------select from table2.bank,table1.religion where table2.name=table1.name; -----------------------------------------------------------------------------select from table2.bank,table1.religion where table2.name=table1.name SQL0104N An unexpected token "." was found following "select from table2". Expected tokens may include: "FROM". SQLSTATE=42601 SQL0104N An unexpected token "." was found following "select from table2". Ex pected tokens may include: "FROM ". Explanation: A syntax error in the SQL statement or the input command string for the SYSPROC.ADMIN_CMD procedure was detected at the specified token following the text "<text>". The "<text>" field indicates the 20 characters of the SQL statement or the input command string for the SYSPROC.ADMIN_CMD procedure that preceded the token that is not valid.

As an aid, a partial list of valid tokens is provided in the SQLERRM field of the SQLCA as "<token-list>". This list assumes the statement is correct to that point. The statement cannot be processed. User response: Examine and correct the statement in the area of the specified token. sqlcode: -104 sqlstate: 42601

------------------------------ Commands Entered -----------------------------select from table2.bank,table1.religion where table2.name=table1.name; -----------------------------------------------------------------------------select from table2.bank,table1.religion where table2.name=table1.name SQL0104N An unexpected token "." was found following "select from table2". Expected tokens may include: "FROM". SQLSTATE=42601 SQL0104N An unexpected token "." was found following "select from table2". Ex pected tokens may include: "FROM ". Explanation: A syntax error in the SQL statement or the input command string for the SYSPROC.ADMIN_CMD procedure was detected at the specified token following the text "<text>". The "<text>" field indicates the 20 characters of the SQL statement or the input command string for the SYSPROC.ADMIN_CMD procedure that preceded the token that is not valid. As an aid, a partial list of valid tokens is provided in the SQLERRM field of the SQLCA as "<token-list>". This list assumes the statement is correct to that point. The statement cannot be processed. User response: Examine and correct the statement in the area of the specified token. sqlcode: -104 sqlstate: 42601

------------------------------ Commands Entered -----------------------------select table2.bank ,table1.religion from table2,table1 where table2.name=table 1.name; -----------------------------------------------------------------------------Results for a single query are displayed on the Query Results tab. 3 row(s) returned successfully. ------------------------------ Commands Entered -----------------------------select table2.bank ,table1.religion from table2,table1;

-----------------------------------------------------------------------------Results for a single query are displayed on the Query Results tab. 9 row(s) returned successfully. ------------------------------ Commands Entered -----------------------------select table2.bank ,table1.religion from table2,table1 where table2.name=table1 .name; -----------------------------------------------------------------------------Results for a single query are displayed on the Query Results tab. 3 row(s) returned successfully. ------------------------------ Commands Entered -----------------------------select * from table2,table1 where table2.name=table1.name; -----------------------------------------------------------------------------Results for a single query are displayed on the Query Results tab. 3 row(s) returned successfully. ------------------------------ Commands Entered -----------------------------select * from table2,table1 where table2.name=table1.name; -----------------------------------------------------------------------------Results for a single query are displayed on the Query Results tab. 3 row(s) returned successfully. ------------------------------ Commands Entered -----------------------------insert into table2 values ('a','k'); -----------------------------------------------------------------------------insert into table2 values ('a','k') DB20000I The SQL command completed successfully. ------------------------------ Commands Entered -----------------------------select table1.city,table2.bank from table1,table2 where table1.city=table2.bank; -----------------------------------------------------------------------------Results for a single query are displayed on the Query Results tab. 0 row(s) returned successfully. ------------------------------ Commands Entered -----------------------------select table1.city,table2.bank from table1,table2 ; -----------------------------------------------------------------------------Results for a single query are displayed on the Query Results tab. 12 row(s) returned successfully. ------------------------------ Commands Entered -----------------------------select table1.city,table2.bank from table1,table2 where table1.name=table2.name; -----------------------------------------------------------------------------Results for a single query are displayed on the Query Results tab. 4 row(s) returned successfully. ------------------------------ Commands Entered -----------------------------select table1.religion,table2.k from table1,table2 where table1.name=table2.name ; -----------------------------------------------------------------------------select table1.religion,table2.k from table1,table2 where table1.name=table2.name SQL0206N "TABLE2.K" is not valid in the context where it is used. SQLSTATE=42703

SQL0206N "TABLE2.K " is not valid in the context where it is used. Explanation: This error can occur in the following cases: * For an INSERT or UPDATE statement, the specified column is not a column of the table, or view that was specified as the object of the insert or update. * For a SELECT or DELETE statement, the specified column is not a column of any of the tables or views identified in a FROM clause in the statement. * For an assignment statement, the reference name does not resolve to the name of a column or variable. * When referencing a field in a row type variable, the reference name does not resolve to the name of any field in the row type. * For a SELECT statement in a parameterized cursor constructor, the reference to "<name>" does not match a column or in-scope variable. Local variables and routine SQL parameters are not considered in scope for parameterized cursors. * For an ORDER BY clause, the specified column is a correlated column reference in a subselect, which is not allowed. * For a SELECT statement in a parameterized cursor constructor, the reference to "<name>" does not match a column or in-scope variable. Local variables and routine SQL parameters are not considered in scope for parameterized cursors. * For a standalone compound SQL (compiled) statement: * The reference "<name>" does not resolve to the name of a column or local variable that is in scope. * The condition name "<name>" specified in the SIGNAL statement has not been declared. * When referencing a field in a row type variable, the reference name does not resolve to the name of any field in the row type. * For a standalone compound SQL (compiled) statement: * The reference "<name>" does not resolve to the name of a column or local variable that is in scope. * The condition name "<name>" specified in the SIGNAL statement has not been declared. * When referencing a field in a row type variable, the reference name does not resolve to the name of any field in the row type. * For a CREATE TRIGGER,CREATE METHOD,CREATE FUNCTION or CREATE PROCEDURE statement: * The reference "<name>" does not resolve to the name of a column, local variable or transition variable. * The reference "<name>" resolves to the name of a local variable that is not available in the current scope. * The condition name "<name>" specified in the SIGNAL statement has not been declared. * When referencing a field in a row type variable, the reference name does not resolve to the name of any field in the row type. * For a CREATE TRIGGER statement: * A reference is made to a column of the subject table without using an OLD or NEW correlation name. * The left hand side of an assignment in the SET transition-variable statement in the triggered action specifies an old transition variable where only a new transition variable is supported.

* For a CREATE FUNCTION statement with a PREDICATES clause: * The RETURN statement of the SQL function references a variable that is not a parameter or other variable that is in the scope of the RETURN statement. * The FILTER USING clause references a variable that is not a parameter name or an expression name in the WHEN clause. * The search target in an index exploitation rule does not match some parameter name of the function that is being created. * A search argument in an index exploitation rule does not match either an expression name in the EXPRESSION AS clause or a parameter name of the function being created. * For a CREATE INDEX EXTENSION statement, the RANGE THROUGH clause or the FILTER USING clause references a variable that is not a parameter name that can be used in the clause. * For a parameterized cursor variable reference, a local SQL variable or SQL parameter referenced in the select statement used in the definition of a parameterized cursor variable is not available in the current scope. The statement cannot be processed. User response: Verify that the names are specified correctly in the SQL statement. For a SELECT statement, ensure that all the required tables are named in the FROM clause. For a subselect in an ORDER BY clause, ensure that there are no correlated column references. If a correlation name is used for a table, verify that subsequent references use the correlation name and not the table name. For a CREATE TRIGGER statement, ensure that only new transition variables are specified on the left hand side of assignments in the SET transition-variable statement and that any reference to columns of the subject table have a correlation name specified. For a standalone compound SQL statement, CREATE FUNCTION, CREATE PROCEDURE, or CREATE TRIGGER statement, verify that the columns or variables are available in the scope of the current compound SQL statement. For a fullselect embedded in XQuery using the db2-fn:sqlquery function, a reference within the fullselect must be one of the following: a column in the context of the fullselect, a global variable, or a parameter passed to the new SQL context using an additional argument of the db2-fn:sqlquery function. sqlcode: -206 sqlstate: 42703

------------------------------ Commands Entered -----------------------------select table1.religion,table2.bank from table1,table2 where table1.name=table2.n ame and table2.bank='k'; -----------------------------------------------------------------------------Results for a single query are displayed on the Query Results tab.

2 row(s) returned successfully. ------------------------------ Commands Entered -----------------------------select table1.add,table2.bank from table1,table2 where table1.name=table2.name a nd table1.add='b'; -----------------------------------------------------------------------------Results for a single query are displayed on the Query Results tab. 2 row(s) returned successfully. ------------------------------ Commands Entered -----------------------------create table table3(name varchar(25),college varchar(25),collegecity varchar(25) ); -----------------------------------------------------------------------------create table table3(name varchar(25),college varchar(25),collegecity varchar(25) ) DB20000I The SQL command completed successfully. ------------------------------ Commands Entered -----------------------------create table table4(name varchar(25),college varchar(25),collegecity varchar(25) ,fees int); -----------------------------------------------------------------------------create table table4(name varchar(25),college varchar(25),collegecity varchar(25) ,fees int) DB20000I The SQL command completed successfully. ------------------------------ Commands Entered -----------------------------create table table5(name varchar(25),bank varchar(25),amount int); -----------------------------------------------------------------------------create table table5(name varchar(25),bank varchar(25),amount int) DB20000I The SQL command completed successfully. ------------------------------ Commands Entered -----------------------------insert into values('a','t','d','1000'); -----------------------------------------------------------------------------insert into values('a','t','d','1000') DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: SQL0104N An unexpected token "'a'" was found following "insert into values(". Expected tokens may include: "<values>". SQLSTATE=42601 SQL0104N An unexpected token "'a'" was found following "insert into values(". Expected tokens may include: "<values> ". Explanation: A syntax error in the SQL statement or the input command string for the SYSPROC.ADMIN_CMD procedure was detected at the specified token following the text "<text>". The "<text>" field indicates the 20 characters of the SQL statement or the input command string for the SYSPROC.ADMIN_CMD procedure that preceded the token that is not valid. As an aid, a partial list of valid tokens is provided in the SQLERRM field of the SQLCA as "<token-list>". This list assumes the statement is correct to that point. The statement cannot be processed. User response: Examine and correct the statement in the area of the specified token.

sqlcode: -104 sqlstate: 42601

------------------------------ Commands Entered -----------------------------insert into table values('a','t','d','1000'); -----------------------------------------------------------------------------insert into table values('a','t','d','1000') DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: SQL0204N "MIDHUN.TABLE" is an undefined name. SQLSTATE=42704 SQL0204N "MIDHUN.TABLE " is an undefined name. Explanation: This error is caused by one of the following: * The object identified by "<name>" is not defined in the database. * The object identified by "<name>" is defined in a module and is not a published module object and it was referenced from outside the module. * The data partition identified by "<name>" is not defined on the table. * A data type is being used. This error can occur for the following reasons: * If "<name>" is qualified, then a data type with this name does not exist in either the schema that matches the qualifier or the module that matches the qualifier that was found first based on user's SQL path. * If "<name>" is unqualified, then the user's path does not contain the schema to which the desired data type belongs or the data type is not defined in the module if the reference is within a module routine. * The data type does not exist in the database with a create timestamp earlier than the time the package was bound (applies to static statements). * If the data type is in the UNDER clause of a CREATE TYPE statement, the type name may be the same as the type being defined, which is not valid. * A * * * function is being referenced in one of: a DROP FUNCTION statement a COMMENT ON FUNCTION statement the SOURCE clause of a CREATE FUNCTION statement If "<name>" is qualified, then the function does not exist. If "<name>" is unqualified, then a function of this name does not exist in any schema of the current path.

Note that a function cannot be sourced on the COALESCE, DBPARTITIONNUM, GREATEST, HASHEDVALUE, LEAST, MAX (scalar), MIN (scalar), NULLIF, RID, NVL, RAISE_ERROR, TYPE_ID, TYPE_NAME, TYPE_SCHEMA, or VALUE built-in functions.

* The element named "<name>" is used on the right side of the UNDER clause in CREATE SECURITY LABEL COMPONENT statement but has not yet been defined as being ROOT or being UNDER some other element * The security label component element named "<name>" has not yet been defined. * One of the following scalar functions specified a security policy identified by "<name>" which is not defined in the database. * SECLABEL * SECLABEL_TO_CHAR * SECLABEL_BY_NAME This return code can be generated for any type of database object. Federated system users: the object identified by "<name>" is not defined in the database or "<name>" is not a nickname in a DROP NICKNAME statement. Some data sources do not provide the appropriate values for "<name>". In these cases, the message token will have the following format: "OBJECT:<data source> TABLE/VIEW", indicating that the actual value for the specified data source is unknown. The statement cannot be processed. User response: Ensure that the object name (including any required qualifiers) is correctly specified in the SQL statement and it exists. If the name refers to a data partition, query the catalog table SYSCAT.DATAPARTITIONS to find the names of all the data partitions for a table. For missing data type or function in SOURCE clause, it may be that the object does not exist, OR it may be that the object does exist in some schema, but the schema is not present in your path. For the CREATE or ALTER SECURITY LABEL COMPONENT statement, make sure that each element specified as a reference element value for positioning the location of a new element value already exists in the security label component. For the CREATE SECURITY LABEL COMPONENT statement, make sure that each element is specified as either ROOT or as the child in an UNDER clause before specifying it as the parent in an UNDER clause. For the scalar functions SECLABEL, SECLABEL_TO_CHAR or SECLABEL_BY_NAME, ensure that a valid security policy was specified for the argument security-policy-name. Federated object is federated federated any). system users: if the statement is DROP NICKNAME, make sure the actually a nickname. The object might not exist in the database or at the data source. Verify the existence of the database objects (if any) and the data source objects (if

sqlcode: -204 sqlstate: 42704

------------------------------ Commands Entered ------------------------------

insert into table4 values('a','t','d','1000'); -----------------------------------------------------------------------------insert into table4 values('a','t','d','1000') DB20000I The SQL command completed successfully. ------------------------------ Commands Entered -----------------------------insert into table4 values('u','t','r','500'); -----------------------------------------------------------------------------insert into table4 values('u','t','r','500') DB20000I The SQL command completed successfully. ------------------------------ Commands Entered -----------------------------insert into table4 values('j','n','p','1200'); -----------------------------------------------------------------------------insert into table4 values('j','n','p','1200') DB20000I The SQL command completed successfully. ------------------------------ Commands Entered -----------------------------insert into table4 values('a','l','x','14000'); -----------------------------------------------------------------------------insert into table4 values('a','l','x','14000') DB20000I The SQL command completed successfully. ------------------------------ Commands Entered -----------------------------insert into table4 values('a','l','x','14000'); -----------------------------------------------------------------------------insert into table4 values('a','l','x','14000') DB20000I The SQL command completed successfully. ------------------------------ Commands Entered -----------------------------insert into table5 values('a','g','x',30000'); -----------------------------------------------------------------------------insert into table5 values('a','g','x',30000') DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: SQL0010N The string constant beginning with "')" does not have an ending string delimiter. SQLSTATE=42603 SQL0010N The string constant beginning with "') " does not have an ending string delimiter. Explanation: The statement contains a string constant, beginning with "<string>", that is not terminated properly. The statement cannot be processed. User response: Examine the statement for missing apostrophes in the indicated string constant. sqlcode: -10 sqlstate: 42603

------------------------------ Commands Entered ------------------------------

insert into table5 values('a','g',30000'); -----------------------------------------------------------------------------insert into table5 values('a','g',30000') DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: SQL0010N The string constant beginning with "')" does not have an ending string delimiter. SQLSTATE=42603 SQL0010N The string constant beginning with "') " does not have an ending string delimiter. Explanation: The statement contains a string constant, beginning with "<string>", that is not terminated properly. The statement cannot be processed. User response: Examine the statement for missing apostrophes in the indicated string constant. sqlcode: -10 sqlstate: 42603

------------------------------ Commands Entered -----------------------------insert into table5 values('a','g',30000'); -----------------------------------------------------------------------------insert into table5 values('a','g',30000') DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: SQL0010N The string constant beginning with "')" does not have an ending string delimiter. SQLSTATE=42603 SQL0010N The string constant beginning with "') " does not have an ending string delimiter. Explanation: The statement contains a string constant, beginning with "<string>", that is not terminated properly. The statement cannot be processed. User response: Examine the statement for missing apostrophes in the indicated string constant. sqlcode: -10 sqlstate: 42603

------------------------------ Commands Entered ------------------------------

insert into table5 values('a','g',30000'); -----------------------------------------------------------------------------insert into table5 values('a','g',30000') DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: SQL0010N The string constant beginning with "')" does not have an ending string delimiter. SQLSTATE=42603 SQL0010N The string constant beginning with "') " does not have an ending string delimiter. Explanation: The statement contains a string constant, beginning with "<string>", that is not terminated properly. The statement cannot be processed. User response: Examine the statement for missing apostrophes in the indicated string constant. sqlcode: -10 sqlstate: 42603

------------------------------ Commands Entered -----------------------------insert into table5 values('a','g','30000'); -----------------------------------------------------------------------------insert into table5 values('a','g','30000') DB20000I The SQL command completed successfully. ------------------------------ Commands Entered -----------------------------insert into table5 values('j','k','40000'); -----------------------------------------------------------------------------insert into table5 values('j','k','40000') DB20000I The SQL command completed successfully. ------------------------------ Commands Entered -----------------------------insert into table5 values('u','l','50000'); -----------------------------------------------------------------------------insert into table5 values('u','l','50000') DB20000I The SQL command completed successfully. ------------------------------ Commands Entered -----------------------------insert into table5 values('a','k','10000'); -----------------------------------------------------------------------------insert into table5 values('a','k','10000') DB20000I The SQL command completed successfully. ------------------------------ Commands Entered -----------------------------insert into table5 values('a','k','10000'); -----------------------------------------------------------------------------insert into table5 values('a','k','10000') DB20000I The SQL command completed successfully. ------------------------------ Commands Entered ------------------------------

insert into table5 values('a','k','10000'); -----------------------------------------------------------------------------insert into table5 values('a','k','10000') DB20000I The SQL command completed successfully. ------------------------------ Commands Entered -----------------------------insert into table5 values('a','k','10000'); -----------------------------------------------------------------------------insert into table5 values('a','k','10000') DB20000I The SQL command completed successfully. ------------------------------ Commands Entered -----------------------------insert into table5 values('a','k','10000'); -----------------------------------------------------------------------------insert into table5 values('a','k','10000') DB20000I The SQL command completed successfully. ------------------------------ Commands Entered -----------------------------insert into table5 values('a','k','10000'); -----------------------------------------------------------------------------insert into table5 values('a','k','10000') DB20000I The SQL command completed successfully. ------------------------------ Commands Entered -----------------------------insert into table5 values('a','k','10000'); -----------------------------------------------------------------------------insert into table5 values('a','k','10000') DB20000I The SQL command completed successfully. ------------------------------ Commands Entered -----------------------------insert into table5 values('a','k','10000'); -----------------------------------------------------------------------------insert into table5 values('a','k','10000') DB20000I The SQL command completed successfully. ------------------------------ Commands Entered -----------------------------insert into table5 values('a','k','10000'); -----------------------------------------------------------------------------insert into table5 values('a','k','10000') DB20000I The SQL command completed successfully. ------------------------------ Commands Entered -----------------------------insert into table5 values('a','k','10000'); -----------------------------------------------------------------------------insert into table5 values('a','k','10000') DB20000I The SQL command completed successfully. ------------------------------ Commands Entered -----------------------------insert into table5 values('a','k','10000'); -----------------------------------------------------------------------------insert into table5 values('a','k','10000') DB20000I The SQL command completed successfully. ------------------------------ Commands Entered -----------------------------insert into table5 values('a','k','10000'); -----------------------------------------------------------------------------insert into table5 values('a','k','10000') DB20000I The SQL command completed successfully. ------------------------------ Commands Entered ------------------------------

insert into table5 values('a','k','10000'); -----------------------------------------------------------------------------insert into table5 values('a','k','10000') DB20000I The SQL command completed successfully. ------------------------------ Commands Entered -----------------------------insert into table5 values('a','k','10000'); -----------------------------------------------------------------------------insert into table5 values('a','k','10000') DB20000I The SQL command completed successfully. ------------------------------ Commands Entered -----------------------------insert into table5 values('a','k','10000'); -----------------------------------------------------------------------------insert into table5 values('a','k','10000') DB20000I The SQL command completed successfully. ------------------------------ Commands Entered -----------------------------insert into table5 values('a','k','10000'); -----------------------------------------------------------------------------insert into table5 values('a','k','10000') DB20000I The SQL command completed successfully. ------------------------------ Commands Entered -----------------------------insert into table5 values('a','k','10000'); -----------------------------------------------------------------------------insert into table5 values('a','k','10000') DB20000I The SQL command completed successfully. ------------------------------ Commands Entered -----------------------------insert into table5 values('a','k','10000'); -----------------------------------------------------------------------------insert into table5 values('a','k','10000') DB20000I The SQL command completed successfully. ------------------------------ Commands Entered -----------------------------insert into table5 values('a','k','10000'); -----------------------------------------------------------------------------insert into table5 values('a','k','10000') DB20000I The SQL command completed successfully. ------------------------------ Commands Entered -----------------------------insert into table5 values('a','k','10000'); -----------------------------------------------------------------------------insert into table5 values('a','k','10000') DB20000I The SQL command completed successfully. ------------------------------ Commands Entered -----------------------------select * from table5; -----------------------------------------------------------------------------Results for a single query are displayed on the Query Results tab. 23 row(s) returned successfully. ------------------------------ Commands Entered -----------------------------select * from table5; -----------------------------------------------------------------------------Results for a single query are displayed on the Query Results tab. 4 row(s) returned successfully. ------------------------------ Commands Entered ------------------------------

select * from table4; -----------------------------------------------------------------------------Results for a single query are displayed on the Query Results tab. 5 row(s) returned successfully. ------------------------------ Commands Entered -----------------------------select table1.city,table4.collegecity from table1,table4 where table.name=table4 .name; -----------------------------------------------------------------------------select table1.city,table4.collegecity from table1,table4 where table.name=table4 .name SQL0206N "TABLE.NAME" is not valid in the context where it is used. SQLSTATE=42703 SQL0206N "TABLE.NAME " is not valid in the context where it is used. Explanation: This error can occur in the following cases: * For an INSERT or UPDATE statement, the specified column is not a column of the table, or view that was specified as the object of the insert or update. * For a SELECT or DELETE statement, the specified column is not a column of any of the tables or views identified in a FROM clause in the statement. * For an assignment statement, the reference name does not resolve to the name of a column or variable. * When referencing a field in a row type variable, the reference name does not resolve to the name of any field in the row type. * For a SELECT statement in a parameterized cursor constructor, the reference to "<name>" does not match a column or in-scope variable. Local variables and routine SQL parameters are not considered in scope for parameterized cursors. * For an ORDER BY clause, the specified column is a correlated column reference in a subselect, which is not allowed. * For a SELECT statement in a parameterized cursor constructor, the reference to "<name>" does not match a column or in-scope variable. Local variables and routine SQL parameters are not considered in scope for parameterized cursors. * For a standalone compound SQL (compiled) statement: * The reference "<name>" does not resolve to the name of a column or local variable that is in scope. * The condition name "<name>" specified in the SIGNAL statement has not been declared. * When referencing a field in a row type variable, the reference name does not resolve to the name of any field in the row type. * For a standalone compound SQL (compiled) statement: * The reference "<name>" does not resolve to the name of a column or local variable that is in scope. * The condition name "<name>" specified in the SIGNAL statement has not been declared. * When referencing a field in a row type variable, the reference name does not resolve to the name of any field in the row type. * For a CREATE TRIGGER,CREATE METHOD,CREATE FUNCTION or CREATE PROCEDURE statement: * The reference "<name>" does not resolve to the name of a column,

local variable or transition variable. * The reference "<name>" resolves to the name of a local variable that is not available in the current scope. * The condition name "<name>" specified in the SIGNAL statement has not been declared. * When referencing a field in a row type variable, the reference name does not resolve to the name of any field in the row type. * For a CREATE TRIGGER statement: * A reference is made to a column of the subject table without using an OLD or NEW correlation name. * The left hand side of an assignment in the SET transition-variable statement in the triggered action specifies an old transition variable where only a new transition variable is supported. * For a CREATE FUNCTION statement with a PREDICATES clause: * The RETURN statement of the SQL function references a variable that is not a parameter or other variable that is in the scope of the RETURN statement. * The FILTER USING clause references a variable that is not a parameter name or an expression name in the WHEN clause. * The search target in an index exploitation rule does not match some parameter name of the function that is being created. * A search argument in an index exploitation rule does not match either an expression name in the EXPRESSION AS clause or a parameter name of the function being created. * For a CREATE INDEX EXTENSION statement, the RANGE THROUGH clause or the FILTER USING clause references a variable that is not a parameter name that can be used in the clause. * For a parameterized cursor variable reference, a local SQL variable or SQL parameter referenced in the select statement used in the definition of a parameterized cursor variable is not available in the current scope. The statement cannot be processed. User response: Verify that the names are specified correctly in the SQL statement. For a SELECT statement, ensure that all the required tables are named in the FROM clause. For a subselect in an ORDER BY clause, ensure that there are no correlated column references. If a correlation name is used for a table, verify that subsequent references use the correlation name and not the table name. For a CREATE TRIGGER statement, ensure that only new transition variables are specified on the left hand side of assignments in the SET transition-variable statement and that any reference to columns of the subject table have a correlation name specified. For a standalone compound SQL statement, CREATE FUNCTION, CREATE PROCEDURE, or CREATE TRIGGER statement, verify that the columns or variables are available in the scope of the current compound SQL statement. For a fullselect embedded in XQuery using the db2-fn:sqlquery function, a reference within the fullselect must be one of the following: a column in the context of the fullselect, a global variable, or a parameter passed to the new SQL context using an additional argument of the

db2-fn:sqlquery function. sqlcode: -206 sqlstate: 42703

------------------------------ Commands Entered -----------------------------select* from table1,table4 where table.name=table4.name; -----------------------------------------------------------------------------select* from table1,table4 where table.name=table4.name DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: SQL0206N "TABLE.NAME" is not valid in the context where it is used. SQLSTATE=42703 SQL0206N "TABLE.NAME " is not valid in the context where it is used. Explanation: This error can occur in the following cases: * For an INSERT or UPDATE statement, the specified column is not a column of the table, or view that was specified as the object of the insert or update. * For a SELECT or DELETE statement, the specified column is not a column of any of the tables or views identified in a FROM clause in the statement. * For an assignment statement, the reference name does not resolve to the name of a column or variable. * When referencing a field in a row type variable, the reference name does not resolve to the name of any field in the row type. * For a SELECT statement in a parameterized cursor constructor, the reference to "<name>" does not match a column or in-scope variable. Local variables and routine SQL parameters are not considered in scope for parameterized cursors. * For an ORDER BY clause, the specified column is a correlated column reference in a subselect, which is not allowed. * For a SELECT statement in a parameterized cursor constructor, the reference to "<name>" does not match a column or in-scope variable. Local variables and routine SQL parameters are not considered in scope for parameterized cursors. * For a standalone compound SQL (compiled) statement: * The reference "<name>" does not resolve to the name of a column or local variable that is in scope. * The condition name "<name>" specified in the SIGNAL statement has not been declared. * When referencing a field in a row type variable, the reference name does not resolve to the name of any field in the row type. * For a standalone compound SQL (compiled) statement: * The reference "<name>" does not resolve to the name of a column or local variable that is in scope. * The condition name "<name>" specified in the SIGNAL statement has not been declared. * When referencing a field in a row type variable, the reference name does not resolve to the name of any field in the row type.

* For a CREATE TRIGGER,CREATE METHOD,CREATE FUNCTION or CREATE PROCEDURE statement: * The reference "<name>" does not resolve to the name of a column, local variable or transition variable. * The reference "<name>" resolves to the name of a local variable that is not available in the current scope. * The condition name "<name>" specified in the SIGNAL statement has not been declared. * When referencing a field in a row type variable, the reference name does not resolve to the name of any field in the row type. * For a CREATE TRIGGER statement: * A reference is made to a column of the subject table without using an OLD or NEW correlation name. * The left hand side of an assignment in the SET transition-variable statement in the triggered action specifies an old transition variable where only a new transition variable is supported. * For a CREATE FUNCTION statement with a PREDICATES clause: * The RETURN statement of the SQL function references a variable that is not a parameter or other variable that is in the scope of the RETURN statement. * The FILTER USING clause references a variable that is not a parameter name or an expression name in the WHEN clause. * The search target in an index exploitation rule does not match some parameter name of the function that is being created. * A search argument in an index exploitation rule does not match either an expression name in the EXPRESSION AS clause or a parameter name of the function being created. * For a CREATE INDEX EXTENSION statement, the RANGE THROUGH clause or the FILTER USING clause references a variable that is not a parameter name that can be used in the clause. * For a parameterized cursor variable reference, a local SQL variable or SQL parameter referenced in the select statement used in the definition of a parameterized cursor variable is not available in the current scope. The statement cannot be processed. User response: Verify that the names are specified correctly in the SQL statement. For a SELECT statement, ensure that all the required tables are named in the FROM clause. For a subselect in an ORDER BY clause, ensure that there are no correlated column references. If a correlation name is used for a table, verify that subsequent references use the correlation name and not the table name. For a CREATE TRIGGER statement, ensure that only new transition variables are specified on the left hand side of assignments in the SET transition-variable statement and that any reference to columns of the subject table have a correlation name specified. For a standalone compound SQL statement, CREATE FUNCTION, CREATE PROCEDURE, or CREATE TRIGGER statement, verify that the columns or variables are available in the scope of the current compound SQL statement. For a fullselect embedded in XQuery using the db2-fn:sqlquery function,

a reference within the fullselect must be one of the following: a column in the context of the fullselect, a global variable, or a parameter passed to the new SQL context using an additional argument of the db2-fn:sqlquery function. sqlcode: -206 sqlstate: 42703

------------------------------ Commands Entered -----------------------------select * from table1,table4 where table.name=table4.name; -----------------------------------------------------------------------------select * from table1,table4 where table.name=table4.name SQL0206N "TABLE.NAME" is not valid in the context where it is used. SQLSTATE=42703 SQL0206N "TABLE.NAME " is not valid in the context where it is used. Explanation: This error can occur in the following cases: * For an INSERT or UPDATE statement, the specified column is not a column of the table, or view that was specified as the object of the insert or update. * For a SELECT or DELETE statement, the specified column is not a column of any of the tables or views identified in a FROM clause in the statement. * For an assignment statement, the reference name does not resolve to the name of a column or variable. * When referencing a field in a row type variable, the reference name does not resolve to the name of any field in the row type. * For a SELECT statement in a parameterized cursor constructor, the reference to "<name>" does not match a column or in-scope variable. Local variables and routine SQL parameters are not considered in scope for parameterized cursors. * For an ORDER BY clause, the specified column is a correlated column reference in a subselect, which is not allowed. * For a SELECT statement in a parameterized cursor constructor, the reference to "<name>" does not match a column or in-scope variable. Local variables and routine SQL parameters are not considered in scope for parameterized cursors. * For a standalone compound SQL (compiled) statement: * The reference "<name>" does not resolve to the name of a column or local variable that is in scope. * The condition name "<name>" specified in the SIGNAL statement has not been declared. * When referencing a field in a row type variable, the reference name does not resolve to the name of any field in the row type. * For a standalone compound SQL (compiled) statement: * The reference "<name>" does not resolve to the name of a column or local variable that is in scope. * The condition name "<name>" specified in the SIGNAL statement has not been declared. * When referencing a field in a row type variable, the reference name does not resolve to the name of any field in the row type.

* For a CREATE TRIGGER,CREATE METHOD,CREATE FUNCTION or CREATE PROCEDURE statement: * The reference "<name>" does not resolve to the name of a column, local variable or transition variable. * The reference "<name>" resolves to the name of a local variable that is not available in the current scope. * The condition name "<name>" specified in the SIGNAL statement has not been declared. * When referencing a field in a row type variable, the reference name does not resolve to the name of any field in the row type. * For a CREATE TRIGGER statement: * A reference is made to a column of the subject table without using an OLD or NEW correlation name. * The left hand side of an assignment in the SET transition-variable statement in the triggered action specifies an old transition variable where only a new transition variable is supported. * For a CREATE FUNCTION statement with a PREDICATES clause: * The RETURN statement of the SQL function references a variable that is not a parameter or other variable that is in the scope of the RETURN statement. * The FILTER USING clause references a variable that is not a parameter name or an expression name in the WHEN clause. * The search target in an index exploitation rule does not match some parameter name of the function that is being created. * A search argument in an index exploitation rule does not match either an expression name in the EXPRESSION AS clause or a parameter name of the function being created. * For a CREATE INDEX EXTENSION statement, the RANGE THROUGH clause or the FILTER USING clause references a variable that is not a parameter name that can be used in the clause. * For a parameterized cursor variable reference, a local SQL variable or SQL parameter referenced in the select statement used in the definition of a parameterized cursor variable is not available in the current scope. The statement cannot be processed. User response: Verify that the names are specified correctly in the SQL statement. For a SELECT statement, ensure that all the required tables are named in the FROM clause. For a subselect in an ORDER BY clause, ensure that there are no correlated column references. If a correlation name is used for a table, verify that subsequent references use the correlation name and not the table name. For a CREATE TRIGGER statement, ensure that only new transition variables are specified on the left hand side of assignments in the SET transition-variable statement and that any reference to columns of the subject table have a correlation name specified. For a standalone compound SQL statement, CREATE FUNCTION, CREATE PROCEDURE, or CREATE TRIGGER statement, verify that the columns or variables are available in the scope of the current compound SQL statement.

For a fullselect embedded in XQuery using the db2-fn:sqlquery function, a reference within the fullselect must be one of the following: a column in the context of the fullselect, a global variable, or a parameter passed to the new SQL context using an additional argument of the db2-fn:sqlquery function. sqlcode: -206 sqlstate: 42703

------------------------------ Commands Entered -----------------------------select * from table1,table4 where table1.name=table4.name; -----------------------------------------------------------------------------Results for a single query are displayed on the Query Results tab. 4 row(s) returned successfully. ------------------------------ Commands Entered -----------------------------select table1.city,table4.collegecity from table1,table4 where table1.name=table 4.name; -----------------------------------------------------------------------------Results for a single query are displayed on the Query Results tab. 4 row(s) returned successfully. ------------------------------ Commands Entered -----------------------------select table1.city,table4.collegecity from table1,table4 where table1.name=table 4.name and table1.city==table4.collegecity; -----------------------------------------------------------------------------select table1.city,table4.collegecity from table1,table4 where table1.name=table 4.name and table1.city==table4.collegecity SQL0104N An unexpected token "=" was found following "ame and table1.city=". Expected tokens may include: "<space>". SQLSTATE=42601 SQL0104N An unexpected token "=" was found following "ame and table1.city=". E xpected tokens may include: "<space> ". Explanation: A syntax error in the SQL statement or the input command string for the SYSPROC.ADMIN_CMD procedure was detected at the specified token following the text "<text>". The "<text>" field indicates the 20 characters of the SQL statement or the input command string for the SYSPROC.ADMIN_CMD procedure that preceded the token that is not valid. As an aid, a partial list of valid tokens is provided in the SQLERRM field of the SQLCA as "<token-list>". This list assumes the statement is correct to that point. The statement cannot be processed. User response: Examine and correct the statement in the area of the specified token. sqlcode: -104 sqlstate: 42601

------------------------------ Commands Entered -----------------------------select table1.city,table4.collegecity from table1,table4 where table1.name=table 4.name and table1.city=table4.collegecity; -----------------------------------------------------------------------------Results for a single query are displayed on the Query Results tab. 1 row(s) returned successfully.

You might also like