• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 278
  • Last Modified:

Excell Functions in an SQL query


Is it possible to use the Excell Yield function in an Access SQL statement?
1 Solution
Yield? I'm not aware of that.
Short answer would be "no".

However, you can emulate teh function if you have it's formula...
DaFouAuthor Commented:
I have the formula.
Lets imgine the formula is something like this
How can I emulate it?

Be ware though It has to be working in aceess 97 aswell as in access 2003
If you are working within Access queries and Access SQL (not SQL Server T-SQL), you could create a custom public function and call it within your query. Eg:

Public Function myFunc(val1 as double) as double
  dim x as integer, z as integer
  myFunc = ((x*z)/z)+val1
End Function

Your query:

Select fld1, fld2, myFunc(fld3) as newFld
From tbl1

Hope this gives you some ideas. If you are working with SQL Server T-SQL, you can create your custom functions in SQL Server just the same.

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now