Stored Procedure - Obtaining Output



Hi,

I would like to set up a stored procedure that does the following...
- Check does a record exist in a table
- Return the result (as True or False)

My query is simply
SELECT * FROM TABLE WHERE CODE = '123'

How to I trap the output of this query (as a True or False)!

Thanks,
Wez
.



Relevant Pages

  • Re: noise words, @@ERROR, and stop and resume indexing
    ... > Noiseword varcharNot Null ... > the data from the noise file to the noise_words table. ... >> A clause of the query contained only ignored words. ... >> into query analyzer before starting the stored procedure. ...
    (microsoft.public.sqlserver.fulltext)
  • RE: ODBC query in VB code Need HELP
    ... I am trying to get a stored procedure to run on info I send it I do not need ... I played around and got the code below to work using a pass-through query, ... Dim strpass As String ...
    (microsoft.public.access.formscoding)
  • Re: slowing/halting stored procedure from ado.net
    ... calling the same stored procedure from SQL> Management ... > Studio goes without any slowdown, ... > There was/is no big job running on the sql server, ... >> Erratic performance of any query is usually due to something changing. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Query parameters - Tricky Stored Procedure Question
    ... Dim tCommand As SqlCommand = New SqlCommand ... Here you would pass in your constructed ad-hoc query ... if I have a stored procedure such as ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Query parameters - Tricky Stored Procedure Question
    ... Dim tConnection As SqlConnection = New SqlConnection ... Here you would pass in your constructed ad-hoc query ... This is one case in which an inline ad-hoc query would be preferable ... how is it possible to create a stored procedure which can ...
    (microsoft.public.dotnet.languages.vb)