postgresql- passing results of function into another function - Stack Overflow

I have a function called udf_unixtimestaptodatetime.based off of the unixtimestamp it will provide th

I have a function called udf_unixtimestaptodatetime. based off of the unixtimestamp it will provide the associated date and time. the script works when placing in the unixdatetime (along with other variables required.

Query:

SELECT * 
FROM archive.udf_unixtimestamptodatetime(1742985568, 391);

Working Example

however when i attempt to replace the variables within the function (similar to MSSQL), I receive an error. It will not perform correctly:

Query:

SELECT archive.udf_unixtimestamptodatetime(createddate, lotteryfk)
FROM stage.ticketentry

Will not work when selected like this

In Postgresql, What would be the equivalent of:

Query:

SELECT archive.udf_unixtimestamptodatetime(createddate, lotteryfk)
FROM stage.ticketentry

In other words how do i assign the parameters for the function utilizing the columns from an existing table?

I need to be able to utilize the function to return the date for each column in table.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1743928887a4531440.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信