Re: Can view accept parameters

From: Tibor Karaszi (tibor_please.no.email_karaszi_at_hotmail.nomail.com)
Date: 08/05/04


Date: Thu, 5 Aug 2004 09:53:20 +0200

No. In the relational model, a view is just like a table and a table doesn't accept parameters.

In-line table values functions is what some call "a view that accepts parameters" but that feature was added
in 2000. Can you use a stored procedure instead?

-- 
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"maxzsim" <anonymous@discussions.microsoft.com> wrote in message
news:042d01c47ab0$eb6bcd80$a301280a@phx.gbl...
> Hi Kalen ,
>
>   my appologies ..
>
>   btw i am using SQL 7.0 , is this possible then ?
>
> thks
> >-----Original Message-----
> >What version are you running? Please always state that
> information.
> >
> >If you are using SQL Server 2000, you can create a table
> valued function
> >that can be used EXACTLY like a view which accepts
> parameters. Please read
> >about CREATE FUNCTION in the Books Online.
> >
> >-- 
> >HTH
> >----------------
> >Kalen Delaney
> >SQL Server MVP
> >www.SolidQualityLearning.com
> >
> >
> >"maxzsim" <anonymous@discussions.microsoft.com> wrote in
> message
> >news:056c01c47aae$ea2814d0$a501280a@phx.gbl...
> >> Hi All ,
> >>
> >>   i wonder if a view can accept parameters becoz i only
> >> want to show certain columns based on user's input.
> >>
> >>  if it's not possible, could i know is there other
> >> alternative as to accept both the user's input as well
> as
> >> restrict the column to be displayed as readonly
> >>
> >> thks & rdgs
> >
> >
> >.
> >


Relevant Pages

  • Re: waitresource
    ... SQL Server MVP ... > Also on lock escalation, i think in your Inside SQL server 2000, you ... >> Kalen Delaney ... >> SQL Server MVP ...
    (microsoft.public.sqlserver.server)
  • Re: PAE VS SQL Server AWE
    ... "Mike Epprecht " wrote in message ... > Mike Epprecht, Microsoft SQL Server MVP ... >> Kalen Delaney:-P) that when you shrink the kernel mode address space ...
    (microsoft.public.sqlserver.server)
  • Re: Protecting database
    ... I meant the metadata is available to anyone who can connect! ... "Kalen Delaney" wrote in message ... > SQL Server MVP ...
    (microsoft.public.sqlserver.security)
  • Re: Force 0?
    ... > Pro SQL Server 2000 Database Design ... >> If that is the case, try using GROUP BY ALL MSNumber ... >> Kalen Delaney ... >> SQL Server MVP ...
    (microsoft.public.sqlserver.programming)
  • Re: Return Key (identity) on INSERT operation (SQL/ASP)
    ... hopefully he can expedite processing your full subscription. ... SQL Server MVP ... Columnist, SQL Server Professional ... Please reply to the newsgroup. ...
    (microsoft.public.inetserver.asp.general)