Please add bonuses `Second articule (translation) and YouTube vídeo to cos-url-shortener Project.

I added embedded Python too (but maybe too late) xD


Hi, Nicola

I think best option is $Select as Jolyon write, but you have this option too

set a=0 set:(a>b) a=1

Thanks Alexey for your answer but as Jhon says $now doesn't adjunt for Dailyght Save Time and I need it.  wink

Good morning Michael,

I haven't worked a lot with stored procedures but when I have worked with them, I did it like this.

New stmt,status,rSet,SQLQuery  

 SET SQLQuery = "SELECT PackageName.ClassName_ProcedureName('parameter')" 

 Set stmt = ##class(%SQL.Statement).%New()
 Set status = stmt.%Prepare(SQLQuery) 

 If status'=1 
    Set return="%Prepare failed:" Do $System.Status.DisplayError(status) Quit

 Set rSet = stmt.%Execute() While rSet.%Next()
0 rSet."ColumnName"


I think that your problem is that you're trying to get information using Call instead of Select.

I hope it helps you.

My best,