no problems.
in a module:
function yourOr( x as string, y aa string) as string
....code here
yourFunction = something 'return value
end function
in a query
select yourOr(onecolumn,other) from xxx John Fill
Will it work?
select MyID, max(yourOr(Score, ID)) from yourtable group by MyID
function yourOr( x as int,z as int) as string
static nx as int
static nz as int
if z <> nz then
nx = 0
nz = z
endif
nx = nx or x
yourFunction = nx
end function John Fill
I don't understand...
What is "YourOr(Score,ID)
What is "Score", What is the ID??
/*********************/
// Ido Grinblat
// ido@grinblat.com
// idog@cet.ac.il
/********************/
sorry, not MyID from our table, not ID.
But the query maybe will by more correct as:
select t.MyID, max(t.x) as x from
(select MyID, yourOr(MyScore, MyID) as x from yourtable order by MyID) as t
group by t.MyID John Fill
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.