Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2004
    Location
    india
    Posts
    67

    Unanswered: how to pass parameter

    Dear gurus,

    I want to pass a typical param from UI and db has to handle this

    table a (Col A, Col B, Col C, Status('P','S','A','I'))

    Create Proc myproc (@status String)
    as
    select Col A, Col B, Col C from table a where status in @status;

    Call 1:
    Set @status='P','S'
    Call myproc (@Status)

    Call 2:
    Set @status='P','A','I'
    Call myproc (@Status)


    Call 3:
    Set @status='P','S','A'
    Call myproc (@Status)

    so @status is dynamically build and it could have any combination of status/s

    All our requirement is SP should process the UI request


    Please help us find a solution

    thanx in advance

  2. #2
    Join Date
    Dec 2007
    Posts
    253
    This is not Oracle syntax. What db are you working with?

  3. #3
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    Looks like SqlServer
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •