我正在嘗試一個存儲過程,如下所示。錯誤:運算符不存在:dom_id =在字符65處變化的字符在Postgres SQL
CREATE OR REPLACE FUNCTION "public"."get_fees" (VARCHAR(5000)) RETURNS text[] AS
$body$
DECLARE
student_ids ALIAS FOR $1;
studetFee text[];
BEGIN
FOR studetFee IN
SELECT * FROM Student_fee WHERE student_id IN (student_ids::VARCHAR(5000))
LOOP
**** some ***
END LOOP;
END;
$body$
它顯示我以下錯誤,當我試圖此查詢
SELECT * FROM get_fees('1,2,3,4,5'::VARCHAR(5000));
ERROR: operator does not exist: dom_id = character varying at character 65
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
可能是什麼問題。
感謝 拉胡爾
嘿謝謝:)我的作品。 – 2010-06-22 12:22:36
你能接受答案嗎? – rfusca 2010-06-22 20:37:33