General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Ok I created a funtion that works when I execute it as
"select * from fn_judgecode('_1KD0WC86U')" from the SQL Query analyzer
and it returns mv_judge.
here is the function
CREATE FUNCTION fn_judgecode
(@keyident nvarchar (12))
RETURNS TABLE
AS
RETURN (
SELECT mv_judge
FROM motorvehicle
WHERE keyident = @keyident
)
but when I try to use the funtion as a column in a SQL select by executing
"select py_paydate, fn_judgecode('_1KD0WC86U') from payments"
I get an error "'fn_judgecode' is not a recognized function name."
Does anyone know what I am doing wrong ?
Thanks Again !
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only