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

Excell Functions in an SQL query

Ola,

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

However, you can emulate teh function if you have it's formula...
0
 
DaFouAuthor Commented:
I have the formula.
Lets imgine the formula is something like this
((x*z)/z)+x2
How can I emulate it?

Be ware though It has to be working in aceess 97 aswell as in access 2003
0
 
Jokra_the_BarbarianCommented:
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
  x=1
  z=3
  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.
0

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