Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
ICE929RR
Starting Member
1 Post |
Posted - 2011-04-11 : 07:52:54
|
| Hi all,I'm trying to run sql queries from Access 2007.One of those queries has a function that I use on the query called "ApresStatusSol"***********Public Function ApresStatusSol(Id_Iniciativa As Long) As IntegerSet rs = CurrentDb.OpenRecordset("Select * From TblIniciativasSolucoes where id_iniciativa = " & Id_Iniciativa & "", dbOpenSnapshot)If rs.RecordCount = 0 Then ApresStatusSol = 0Else If rs.ID_Estado = 15 Then ApresStatusSol = 1 Else If rs.ID_Estado = 11 Then ApresStatusSol = 2 Else ApresStatusSol = 0 End If ApresStatusSol = 0 End IfEnd If rs.CloseEnd Function*************The question is... how do I run that procedure in SQL?Like this.. ApresStatusSol([TblIniciativas].[id_iniciativa]) ?Tks |
|
|
|
|
|