MrDavidThorn
asked on
Converting VBA to TSQL help required!
Hi Experts Im converting some VBA code to TSQL, nearly there just having a problem with using functions.
Although the VBA I want to use is a bit more complex then what I want to use below in essence its what I want to achieve.
I know I can use insert/update statements in functions in TSQL, so I guess it must be a procedure with (multiple) return parameters.
Please some one help!
Although the VBA I want to use is a bit more complex then what I want to use below in essence its what I want to achieve.
I know I can use insert/update statements in functions in TSQL, so I guess it must be a procedure with (multiple) return parameters.
Please some one help!
Sub psMy_Procedure()
Dim strName As String
strName = "Dave"
pfMy_ReuturnProcedure strName
MsgBox strName
End Sub
Function pfMy_ReuturnProcedure(strSirName As String)
strSirName = "Thorn"
'Then do some funky insert SQL statement here
End Function
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can create User Defined functions ( that have one or more input parameters) and return a value in exactly the same manner as you would create a VBA Function. These can be called in views, stored procedures etc..
Kelvin
Kelvin
ASKER