Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Server Select Statement
Message
From
21/07/2005 09:18:12
Stephen Hunt
Admit Computer Services Inc.
Farmingdale, New York, United States
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01034265
Message ID:
01034622
Views:
22
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
Map
View

Click here to load this message in the networking platform