我对Postgrace完全陌生。作为我工作的一部分,我得到了下面的执行查询:
>>> d = {'chs_per_cath': [[[10, 11, 12, 13], [13000, 13100, 13200, 13300]],
[[16, 17, 18, 19, 20, 21, 22, 23, 24, 25],
[13400, 13500, 13600, 13700, 13800, 13900, 14000, 14100, 14200, 14300]],
[[32, 33, 34, 35, 36, 37, 38, 39, 40, 41],
[13400, 13500, 13600, 13700, 13800, 13900, 14000, 14100, 14200, 14300]]]}
>>> print(yaml.dump(d, default_flow_style=True))
{chs_per_cath: [[[10, 11, 12, 13], [13000, 13100, 13200, 13300]], [[16, 17, 18, 19,
20, 21, 22, 23, 24, 25], [13400, 13500, 13600, 13700, 13800, 13900, 14000,
14100, 14200, 14300]], [[32, 33, 34, 35, 36, 37, 38, 39, 40, 41], [13400,
13500, 13600, 13700, 13800, 13900, 14000, 14100, 14200, 14300]]]}
运行此命令时,出现以下错误:
SQL错误[42883]:错误:运算符不存在:bigint = @ bigint 提示:没有运算符匹配给定的名称和参数类型。您可能需要添加显式类型转换。 位置:166
我尝试如下声明变量:
select external_source as DownloadUrl, external_status as
DownloadStatus, external_source as DownloadId from downloadrefresh
where subscriberid=@SubscriberId and
profileid=@ProfileId and channeltype=@ChannelType and
messagetypeid=@MessageType and LENGTH(external_source) > 0;
然后,我收到以下错误消息:
do $$
declare
SubscriberId int;
profileid int;
channeltype int;
messagetype int;
begin
select external_source as DownloadUrl,
external_status as DownloadStatus,
external_source as DownloadId
from downloadrefresh
where subscriberid=@SubscriberId and
profileid=@ProfileId and channeltype=@ChannelType and
messagetypeid=@MessageType and LENGTH(external_source) > 0;
end $$
任何人都可以帮我这个忙。我如何在sql之上运行