table variable lookup

O

Ofer

You can create a query that include all the fields from
the table + another field that based on a function that
return tha value of the variable.

"Select *.MyTable, GetVar() as MyVar from MyTable"

function GetVar()
GetVar=MyPubVar
end function
 
O

Ofer

The function is created in a module
function GetVar()

GetVar=MyPubVar
end function

and the SQL in a query
"Select *.MyTable, GetVar() as MyVar from MyTable"
 
C

chuffy

still can't get it work

Ofer said:
The function is created in a module
function GetVar()

GetVar=MyPubVar
end function

and the SQL in a query
"Select *.MyTable, GetVar() as MyVar from MyTable"
 
Top