Re: T-SQL : Unknown number of input parameters

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Aaron Bertrand [MVP] (aaron_at_TRASHaspfaq.com)
Date: 03/14/04


Date: Sun, 14 Mar 2004 14:33:46 -0500

I suggest using a start range and end range, and calculating for all the
dates between x and y. Or, have your program call the stored procedure
multiple times.

-- 
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Jaco" <anonymous@discussions.microsoft.com> wrote in message
news:CBCE0EFF-691C-4EA9-A68C-4FEA56EBDE4F@microsoft.com...
> Hi,
>
> When I will start a query, I want to ask the user to input some parameters
(dates).
> My second problem is that the user have to input minimal 2 dates (input
parameter), but he may choose the number of input parameters. So, in my
programm I don't know before the number of input parameters.
>
>
> Purpose is for each date (input parameter) I have to calculate the balance
of an account on that date. So, the user can ask it for 2 days or for 10
days.
>
> Somebody have an idea to do this?
> Thanks,
> Jaco
>


Relevant Pages

  • Re: Access ADP Form and Stored Procedure as RecordSource Options
    ... Me.RecordSource property, to a second Stored Procedure, in code when ... the Search button was clicked and include all the Input Parameters ... from the search criteria the user would input. ... What I realized is you can't change the RecordSource from one Stored ...
    (microsoft.public.access.adp.sqlserver)
  • Re: SQL transaction rollback problem
    ... I'm not a C++ programmer so can't help you with the syntax, ... close the connection so that it is returned to the pool. ... tell as to how to call the stored procedure from a C++ program. ... You can pass it input parameters and retrieve ...
    (microsoft.public.data.odbc)
  • OleDbParameter.Direction giving problem
    ... I am using visual basic.net with sql server 2000 as back end. ... my data access I am using stored procedures. ... This stored procedure has various ... One of the input parameters is '@OrgRV' - that is for Original ...
    (microsoft.public.dotnet.framework.adonet)
  • RE: OleDbParameter.Direction giving problem
    ... of the input parameters a BLOB and NOT the last one defined? ... "tbj" wrote: ... This stored procedure has various ... I think there is some problem with the 'FORMAL PARAMETER' which it says is ...
    (microsoft.public.dotnet.framework.adonet)
  • using a oracle function within a ADO procedure call statement
    ... I have a problem concerning using a stored procedure with Delphi. ... I try to use a stored procedure which hast two input parameters (a ... The timestamp parameter is my problem since I would like to use the ...
    (comp.lang.pascal.delphi.misc)