Select and procedure / function

Hi,

I'm trying to create a simple select that calls procedure or function the will return a value
without luck.

something like this,

SELECT O.ORDNAME, MY_PROCEDURE_NAME(O.DUEDATE), O.CUST
FROM ORDERS O

  • DUEDATE is stored in a bigint column

the procedure / function needs to take the value (O.DUEDATE)
and convert it to smalldatetime.
I have a built in function that does this conversion
system.dbo.tabula_dateconvert

so I want to use this function with that bigint I paased from the select clause
and return the result

is this for microsoft sql server and what version?
please provide some sample data to see if you could use the out of the box date functions provided by SQL Server itself

create table #sampleorders(ordername varchar(20), 
duedate bigint, cut varchar(50))

insert into #sampleorders
select 'a', 1212121, 'McD'
1 Like

hi

please see below link if it helps

Please Google Serach

I think you can use the core function you already have directly in your code, something like this:

SELECT O.ORDNAME, system.dbo.tabula_dateconvert(O.DUEDATE) AS DUEDATE, O.CUST
FROM ORDERS O

Wonder why he would create any artifacts in system?

1 Like

"system" is a user db in SQL Server, it's not a dbms system db.

1 Like