且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Postgres - 传递表名作为参数,并将结果存储在文件中

更新时间:2023-12-01 11:02:04

我以这种方式排序问题

 Begin
 execute 'select count(*) from ' ||tablename||
' where cast(date_dimension_year || ''-'' || date_dimension_month || ''-''||date_dimension_day as date) 
not between (current_date - interval ''13 months'') and current_date' into total ;

我必须指定整数总和结束,正确关闭引号。

I had to assign the integer total towards the end and proper closing of quotation (') worked for me.( I just pasted a portion of the function where i was getting issue)

感谢您的帮助。