Function to return a single value from an SQL statement

  • Thread starter Thread starter Bill Nguyen
  • Start date Start date
B

Bill Nguyen

VS.NET 2003
SQLserver 2000

I need to create a function to return the single resulting value from an SQL
statement.
For example, "Select max(amount) from tableA"
I would like to reuse the function whenever I can.

Thanks a million

Bill
 
Bill said:
VS.NET 2003
SQLserver 2000

I need to create a function to return the single resulting value from an SQL
statement.
For example, "Select max(amount) from tableA"
I would like to reuse the function whenever I can.

Thanks a million

Bill

This more like an SQL question than a VB question. You can do this as a
Stored Procedure or as a User Defined Function in SQL Server. Which you
need depends on how you plan to use it.

Chris
 
If he uses a User Defined Function, he will still need a query to
obtain the result.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top