商务网站建设调研,怎么用阿里的域名 做网站,怎么用flash做视频网站,郑州网站建设 郑州网站制作我正在编写一个存储过程#xff0c;如下所示我得到的错误是在第3行和第4行#xff0c;这两个错误是第3行是“意外的发布者标识符”#xff0c;第4行是“意外的AS(as)”#xff0c;但我不知道我是怎么得到这些错误或如何解决的他们。 有人可以解释一下为什么我收到这些错误以…我正在编写一个存储过程如下所示我得到的错误是在第3行和第4行这两个错误是第3行是“意外的发布者标识符”第4行是“意外的AS(as)”但我不知道我是怎么得到这些错误或如何解决的他们。 有人可以解释一下为什么我收到这些错误以及可能的解决方法吗DELIMITER //CREATE FUNCTION uspGetPubStatsMEP (pcode publisher.publishercode%TYPE)RETURNS text AS $$DECLAREeachrecord text; -- Variable to hold all the records retrievebooktitle book.title%TYPE;bcode book.bookcode%TYPE;maxonhand text;testtext text:N/A;totonhand text;BEGIN-- Retrieve the name of thepublisherSELECT publishername INTO eachrecordFROM PUBLISHERWHERE publishercode pcode;IF (eachrecordISnull)THENRAISE NOTICE No publisher exists for the given code(%),pcode;RETURN (-1);END IF;-- The number of distinct authors who have written book(s)forthispublisher.SELECT eachrecord|| No.Authors:||COUNT(DISTINCTauthornum)INTOeachrecordFROM BOOK B, WROTE WWHERE publishercodepcodeANDB.bookcodeW.bookcode;-- The number of different books published by this publisher.SELECT eachrecord|| No.Books:||COUNT(*)INTOeachrecordFROM BOOKWHERE publishercodepcode;-- The title of the book published by this publisher,that has the highestnumber-- of onHand (Inventory) values from all branchesof Henry Books.CREATE TABLE book_onhandASSELECT bookcode,SUM(onhand)ASsum_onhandFROM INVENTORYI,BRANCHBWHERE I.branchnumB.branchnumGROUP BY bookcode;CREATE TABLE pubbook_onhand ASSELECT bookcode, sum_onhandFROM book_onhandWHERE bookcodeIN( SELECT bookcodeFROM BOOKWHERE publishercode pcode)GROUP BY bookcode,sum_onhand;SELECT bookcode INTO bcodeFROM pubbook_onhandWHERE sum_onhand (SELECT MAX(sum_onhand)FROM pubbook_onhand);SELECT title INTO booktitleFROM BOOKWHERE bookcodebcode;-- The number of on Hand values for the above book.SELECT sum_onhand INTO maxonhandFROM pubbook_onhandWHERE bookcodeIN ( SELECT bookcodeFROM BOOKWHERE title booktitle);-- The cumulative sum of on Hand values from all branches for all bookspublished by thispublisher.-- use table book_onhandSELECT sum_onhand INTO totonhandFROM book_onhand bh, BOOK BWHERE publishercode pcode ANDbh.bookcode B.bookcode;IF (booktitle IS NULL)THEN SELECT testtext INTO booktitle;SELECT testtext INTO maxonhand;SELECT testtext INTO totonhand;END IF;SELECT eachrecord || onhandVal: ||maxonhand ||Totalonhand:|| totonhand || onHandBook:||booktitle INTO eachrecord;DROP TABLE book_onhand;DROP TABLE pubbook_onhand;RETURN eachrecord;END;$$ language plpgsql;-- Various statistics for all publishers in the databaseCREATE OR REPLACE FUNCTION uspGetAllPubStatsMEP()RETURNS SETOF text as $$DECLAREpcode publisher%rowtype;pubstat text;BEGINFOR pcode IN SELECT * FROM PUBLISHERLOOPSELECT pcode.publishercode||: || uspGetPubStatsMEP(pcode.publishercode)INTO pubstat;RETURN NEXT pubstat;END LOOP;RETURN;END;$$ language plpgsql;SELECT uspGetAllPubStatsMEP ();