在用hive执行存储过程的时候报错了,但是不知道怎么改,求解答。
test2@test2:/hd/apache-hive-2.0.0-bin/bin$ ./hplsql -f /home/test2/t.sql;
line 101:2 extraneous input 'END' expecting {<EOF>, '@', '#', '!', T_ACTION, T_ALL, T_ALLOCATE, T_ALTER, T_AND, T_ANSI_NULLS, T_ANSI_PADDING, T_AS, T_ASC, T_ASSOCIATE, T_AT, T_AVG, T_BATCHSIZE, T_BEGIN, T_BETWEEN, T_BIGINT, T_BINARY_DOUBLE, T_BINARY_FLOAT, T_BIT, T_BODY, T_BREAK, T_BY, T_BYTE, T_CALL, T_CALLER, T_CASCADE, T_CASE, T_CASESPECIFIC, T_CAST, T_CHAR, T_CHARACTER, T_CLIENT, T_CLOSE, T_CLUSTERED, T_CMP, T_COLLECTION, T_CONSTANT, T_COPY, T_COMMIT, T_CONCAT, T_CONDITION, T_CONSTRAINT, T_CONTINUE, T_COUNT, T_COUNT_BIG, T_CREATE, T_CREATION, T_CREATOR, T_CS, T_CURRENT, T_CURRENT_SCHEMA, T_CURSOR, T_DATE, T_DATETIME, T_DAY, T_DAYS, T_DEC, T_DECIMAL, T_DECLARE, T_DEFAULT, T_DEFERRED, T_DEFINED, T_DEFINER, T_DEFINITION, T_DELETE, T_DELIMITED, T_DELIMITER, T_DESC, T_DIAGNOSTICS, T_DISTINCT, T_DISTRIBUTE, T_DO, T_DOUBLE, T_DROP, T_DYNAMIC, T_ESCAPED, T_EXCEPT, T_EXEC, T_EXECUTE, T_EXCEPTION, T_EXCLUSIVE, T_EXISTS, T_EXIT, T_FALSE, T_FETCH, T_FIELDS, T_FILE, T_FLOAT, T_FOR, T_FOREIGN, T_FORMAT, T_FOUND, T_FROM, T_FULL, T_FUNCTION, T_GET, T_GLOBAL, T_GO, T_GRANT, T_GROUP, T_HANDLER, T_HASH, T_HAVING, T_HDFS, T_HIVE, T_HOST, T_IDENTITY, T_IF, T_IGNORE, T_IMMEDIATE, T_IN, T_INCLUDE, T_INDEX, T_INITRANS, T_INNER, T_INOUT, T_INSERT, T_INT, T_INTEGER, T_INTERSECT, T_INTO, T_INVOKER, T_IS, T_ISOPEN, T_ITEMS, T_JOIN, T_KEEP, T_KEY, T_KEYS, T_LANGUAGE, T_LEAVE, T_LEFT, T_LIKE, T_LIMIT, T_LINES, T_LOCAL, T_LOCATOR, T_LOCATORS, T_LOCKS, T_LOGGED, T_LOGGING, T_LOOP, T_MAP, T_MATCHED, T_MAX, T_MAXTRANS, T_MERGE, T_MESSAGE_TEXT, T_MICROSECOND, T_MICROSECONDS, T_MIN, T_MULTISET, T_NCHAR, T_NVARCHAR, T_NO, T_NOCOUNT, T_NOCOMPRESS, T_NOLOGGING, T_NOT, T_NOTFOUND, T_NULL, T_NUMERIC, T_NUMBER, T_OBJECT, T_OFF, T_ON, T_ONLY, T_OPEN, T_OR, T_ORDER, T_OUT, T_OUTER, T_OVER, T_OVERWRITE, T_OWNER, T_PACKAGE, T_PARTITION, T_PCTFREE, T_PCTUSED, T_PRECISION, T_PRESERVE, T_PRIMARY, T_PRINT, T_PROC, T_PROCEDURE, T_QUOTED_IDENTIFIER, T_REAL, T_REFERENCES, T_REGEXP, T_REPLACE, T_RESIGNAL, T_RESTRICT, T_RESULT, T_RESULT_SET_LOCATOR, T_RETURN, T_RETURNS, T_REVERSE, T_RIGHT, T_RLIKE, T_ROLE, T_ROLLBACK, T_ROW, T_ROWS, T_ROW_COUNT, T_RR, T_RS, T_TRIM, T_SCHEMA, T_SECURITY, T_SEGMENT, T_SEL, T_SELECT, T_SET, T_SETS, T_SHARE, T_SIGNAL, T_SIMPLE_DOUBLE, T_SIMPLE_FLOAT, T_SMALLDATETIME, T_SMALLINT, T_SQL, T_SQLEXCEPTION, T_SQLINSERT, T_SQLSTATE, T_SQLWARNING, T_STEP, T_STORAGE, T_STRING, T_SUBSTRING, T_SUM, T_SYS_REFCURSOR, T_TABLE, T_TABLESPACE, T_TEMPORARY, T_TERMINATED, T_TEXTIMAGE_ON, T_THEN, T_TIMESTAMP, T_TITLE, T_TO, T_TOP, T_TRUE, T_UNIQUE, T_UPDATE, T_UR, T_USE, T_USING, T_VALUE, T_VALUES, T_VAR, T_VARCHAR, T_VARCHAR2, T_VARYING, T_VOLATILE, T_WHILE, T_WITH, T_WITHOUT, T_WORK, T_XACT_ABORT, T_XML, T_ACTIVITY_COUNT, T_CUME_DIST, T_CURRENT_DATE, T_CURRENT_TIMESTAMP, T_CURRENT_USER, T_DENSE_RANK, T_FIRST_VALUE, T_LAG, T_LAST_VALUE, T_LEAD, T_MAX_PART_STRING, T_MIN_PART_STRING, T_MAX_PART_INT, T_MIN_PART_INT, T_MAX_PART_DATE, T_MIN_PART_DATE, T_PART_COUNT, T_PART_LOC, T_RANK, T_ROW_NUMBER, T_STDEV, T_SYSDATE, T_VARIANCE, T_USER, '+', '/', '<', '(', ';', '-', L_ID, L_S_STRING, L_D_STRING, L_INT, L_DEC, L_LABEL}
line 103:1 extraneous input 'END' expecting {<EOF>, '@', '#', '!', T_ACTION, T_ALL, T_ALLOCATE, T_ALTER, T_AND, T_ANSI_NULLS, T_ANSI_PADDING, T_AS, T_ASC, T_ASSOCIATE, T_AT, T_AVG, T_BATCHSIZE, T_BEGIN, T_BETWEEN, T_BIGINT, T_BINARY_DOUBLE, T_BINARY_FLOAT, T_BIT, T_BODY, T_BREAK, T_BY, T_BYTE, T_CALL, T_CALLER, T_CASCADE, T_CASE, T_CASESPECIFIC, T_CAST, T_CHAR, T_CHARACTER, T_CLIENT, T_CLOSE, T_CLUSTERED, T_CMP, T_COLLECTION, T_CONSTANT, T_COPY, T_COMMIT, T_CONCAT, T_CONDITION, T_CONSTRAINT, T_CONTINUE, T_COUNT, T_COUNT_BIG, T_CREATE, T_CREATION, T_CREATOR, T_CS, T_CURRENT, T_CURRENT_SCHEMA, T_CURSOR, T_DATE, T_DATETIME, T_DAY, T_DAYS, T_DEC, T_DECIMAL, T_DECLARE, T_DEFAULT, T_DEFERRED, T_DEFINED, T_DEFINER, T_DEFINITION, T_DELETE, T_DELIMITED, T_DELIMITER, T_DESC, T_DIAGNOSTICS, T_DISTINCT, T_DISTRIBUTE, T_DO, T_DOUBLE, T_DROP, T_DYNAMIC, T_ESCAPED, T_EXCEPT, T_EXEC, T_EXECUTE, T_EXCEPTION, T_EXCLUSIVE, T_EXISTS, T_EXIT, T_FALSE, T_FETCH, T_FIELDS, T_FILE, T_FLOAT, T_FOR, T_FOREIGN, T_FORMAT, T_FOUND, T_FROM, T_FULL, T_FUNCTION, T_GET, T_GLOBAL, T_GO, T_GRANT, T_GROUP, T_HANDLER, T_HASH, T_HAVING, T_HDFS, T_HIVE, T_HOST, T_IDENTITY, T_IF, T_IGNORE, T_IMMEDIATE, T_IN, T_INCLUDE, T_INDEX, T_INITRANS, T_INNER, T_INOUT, T_INSERT, T_INT, T_INTEGER, T_INTERSECT, T_INTO, T_INVOKER, T_IS, T_ISOPEN, T_ITEMS, T_JOIN, T_KEEP, T_KEY, T_KEYS, T_LANGUAGE, T_LEAVE, T_LEFT, T_LIKE, T_LIMIT, T_LINES, T_LOCAL, T_LOCATOR, T_LOCATORS, T_LOCKS, T_LOGGED, T_LOGGING, T_LOOP, T_MAP, T_MATCHED, T_MAX, T_MAXTRANS, T_MERGE, T_MESSAGE_TEXT, T_MICROSECOND, T_MICROSECONDS, T_MIN, T_MULTISET, T_NCHAR, T_NVARCHAR, T_NO, T_NOCOUNT, T_NOCOMPRESS, T_NOLOGGING, T_NOT, T_NOTFOUND, T_NULL, T_NUMERIC, T_NUMBER, T_OBJECT, T_OFF, T_ON, T_ONLY, T_OPEN, T_OR, T_ORDER, T_OUT, T_OUTER, T_OVER, T_OVERWRITE, T_OWNER, T_PACKAGE, T_PARTITION, T_PCTFREE, T_PCTUSED, T_PRECISION, T_PRESERVE, T_PRIMARY, T_PRINT, T_PROC, T_PROCEDURE, T_QUOTED_IDENTIFIER, T_REAL, T_REFERENCES, T_REGEXP, T_REPLACE, T_RESIGNAL, T_RESTRICT, T_RESULT, T_RESULT_SET_LOCATOR, T_RETURN, T_RETURNS, T_REVERSE, T_RIGHT, T_RLIKE, T_ROLE, T_ROLLBACK, T_ROW, T_ROWS, T_ROW_COUNT, T_RR, T_RS, T_TRIM, T_SCHEMA, T_SECURITY, T_SEGMENT, T_SEL, T_SELECT, T_SET, T_SETS, T_SHARE, T_SIGNAL, T_SIMPLE_DOUBLE, T_SIMPLE_FLOAT, T_SMALLDATETIME, T_SMALLINT, T_SQL, T_SQLEXCEPTION, T_SQLINSERT, T_SQLSTATE, T_SQLWARNING, T_STEP, T_STORAGE, T_STRING, T_SUBSTRING, T_SUM, T_SYS_REFCURSOR, T_TABLE, T_TABLESPACE, T_TEMPORARY, T_TERMINATED, T_TEXTIMAGE_ON, T_THEN, T_TIMESTAMP, T_TITLE, T_TO, T_TOP, T_TRUE, T_UNIQUE, T_UPDATE, T_UR, T_USE, T_USING, T_VALUE, T_VALUES, T_VAR, T_VARCHAR, T_VARCHAR2, T_VARYING, T_VOLATILE, T_WHILE, T_WITH, T_WITHOUT, T_WORK, T_XACT_ABORT, T_XML, T_ACTIVITY_COUNT, T_CUME_DIST, T_CURRENT_DATE, T_CURRENT_TIMESTAMP, T_CURRENT_USER, T_DENSE_RANK, T_FIRST_VALUE, T_LAG, T_LAST_VALUE, T_LEAD, T_MAX_PART_STRING, T_MIN_PART_STRING, T_MAX_PART_INT, T_MIN_PART_INT, T_MAX_PART_DATE, T_MIN_PART_DATE, T_PART_COUNT, T_PART_LOC, T_RANK, T_ROW_NUMBER, T_STDEV, T_SYSDATE, T_VARIANCE, T_USER, '+', '/', '<', '(', ';', '-', L_ID, L_S_STRING, L_D_STRING, L_INT, L_DEC, L_LABEL}
源码部分代码:
-- 变量使用完之后置空
SET v_idvisit=0;
SET v_idaction_url=NULL;
SET v_product_title=NULL;
SET v_idsite=NULL;
SET v_timestamp=NULL;
SET v_time_spent_action=NULL;
SET v_pre_product_url=NULL;
SET v_pre_product_title=NULL;
SET v_city=NULL;
SET v_TRUID=NULL;
SET v_next_idaction_url_id=NULL;
PRINT 'DONE='||done;
END loop1 LOOP;
CLOSE cur2; -- 关闭游标2
SET done=FALSE;-- 将done的值设置为false,不然不会继续下一个游标1
END loop2 LOOP;
CLOSE cur1;
END;
最后一个END就是103行。
|