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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-03-01 : 09:01:24
|
| neil writes "Currently we are using Oracle 8i however we are in the process of converting this db to SQL Server2000/Windows 2000 sp2. In Oracle we have defined a function to either give you the current date time or the date time in a table stored with reference to your user id. This is used to allow testing with a future or historical date without having to rewrite the pkgs that call them. The problem is as you know you cannot us the getdate() function in a UDF so; my ? is do you have any solutions. Oh one other thing is that the function is used in inline Select stmts makeing the use of a Stored Proc not very appealing. Any input would be helpful.Thanks" |
|
|
graz
Chief SQLTeam Crack Dealer
4149 Posts |
Posted - 2002-03-01 : 09:01:24
|
| Sure. Pass getdate() into the function. Then the function can return either the getdate() it was passed or return the value from the table. Kludgy though. |
 |
|
|
|
|
|