0

假设我有一个customerDemand包含两列的表:customer_id,demand

现在我有一个函数fnMapCustToBucket,它接受 acustomer_id并将其映射到测试桶

我想写一个查询,它返回一个表:bucket, customer_id, demand.

我正在努力:

select
    customer_id id,
    demand d,
    db.fnMapCustToBucket(id) 
from
    customerDemand

这不起作用,因为id在函数调用点似乎是未定义的。在这里将不胜感激。谢谢!

4

1 回答 1

1

尝试:

select customer_id id, demand d,
db.fnMapCustToBucket(customer_id)
from customerDemand
于 2013-09-25T17:49:33.363 回答