Results 1 to 2 of 2

Thread: Calculated Fields in a VIEW????

  1. #1

    Thread Starter
    Fanatic Member crispin's Avatar
    Join Date
    Aug 2000
    Location
    2 clicks west of a Quirkafleeg...Cornwall, England
    Posts
    754

    Calculated Fields in a VIEW????

    I want to create a view that goes something like this:

    Field1
    FIELD2 = Exec StoredProcedure Field1AsParameter

    Field1 is an ID

    Field2 is calculated using a stored procedure and passing field1 as a parameter

    this is what I have so far (doesn't work)

    SELECT AccidentID,
    NewCol AS EXEC GetClassification tblAccident.AccidentID
    FROM dbo.tblAccident

    any ideas???
    Crispin
    VB6 ENT SP5
    VB.NET
    W2K ADV SVR SP3
    WWW.BLOCKSOFT.CO.UK

    [Microsoft Basic: 1976-2001, RIP]

  2. #2
    Member
    Join Date
    Aug 1999
    Location
    Ohio
    Posts
    59
    Does the GetClassification sp pass back the value in an output variable?
    If so, declare a variable to hold the return value and then run your select query using the variable.

Posting Permissions

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



Click Here to Expand Forum to Full Width