Re: view calling a view problem

From: Patrick (psully_at_nospam.eatel.net)
Date: 01/26/05


Date: Tue, 25 Jan 2005 18:47:36 -0600

Thanks, Aaron and David. I decided not to use the 2nd to call the 1st when
it was simpler to just have it do its own thing. Sounds like a good idea not
to chain views together, like I found out too, David.
Regards,
Patrick

"Patrick" <psully@nospam.eatel.net> wrote in message
news:l9-dne-yZNEXJ2jcRVn-sQ@eatel.net...
> Thanks Aaron. Strange that a question like this seems so hard to find the
> answer to in a either BOL or tree based SQL books. Um, how can I rewrite
the
> 1st view and not use it, you mean not use that view? I am about to say
screw
> using a view for a view, at least in this case.
>
>
> "Aaron Weiker" <aaron@sqlprogrammer.org> wrote in message
> news:113340632422014152024494@news.microsoft.com...
> > Hello Patrick,
> > You can only reference columns in a view that are in the SELECT list.
That
> > means that if you need a column from your second view you either have to
> > rewrite the first view and not use it, or you need to include it in you
> first
> > view.
> >
> > --
> > Aaron Weiker
> > http://aaronweiker.com/
> >
> > > I have this view:
> > >
> > > CREATE VIEW CautionDescriptions AS
> > > SELECT TOP 100 PERCENT
> > > Oils.OilName AS [Oil name], COALESCE(Cautions.Description, 'No
> > > description available') AS Caution
> > > FROM Cautions
> > > INNER JOIN OilCautions ON Cautions.CautionID = OilCautions.CautionID
> > > RIGHT OUTER JOIN Oils ON OilCautions.OilID = Oils.OilID
> > > ORDER BY Oils.OilName
> > > I want to reference OilCautions.OilID from the above view in another
> > > view. But query analyzer tells me there's no such column. In EM the
> > > only columns that show up in view designer are Description and
> > > Oilname.
> > >
> > > Does a view that calls another view only have access to the output
> > > columns of the 1st view? I need to access OilId, so do I need to put
> > > it in the 1st view, too? If that's true, can I hide that column, make
> > > it there but invisible? :)
> > >
> > > TIA!
> > > patrick
> >
> >
>
>



Relevant Pages

  • Re: =?ISO-8859-1?Q?Die_J=FCnger_-_Verein?= =?ISO-8859-1?Q?te_Gegens=E4tze?=
    ... Der David von Michelangelo ist also der biblische David, ... Weiteres zu Aaron: Er war der aeltere Bruder von Moses ... damit er mir den Priesterdienst ausübt! ... weil der Gott der Bibel es so wollte. ...
    (de.soc.weltanschauung.christentum)
  • Re: BBC iPlayer petition
    ... Aaron wrote: ... looks very interesting and it's certainly worth subscribing too based ... David, one of the reasons we decamped to ...bugs was because of the ... persecution elsewhere whenever a Win PC matter was mentioned. ...
    (comp.sys.acorn.misc)
  • Re: Richwood Artist Series
    ... David would you recommend it over a Takamine EG523SC? ... I have found a one for sale £240 but the Richwood new is £199 but i cant try ... They are copies, generally, of early Taylor design with dovetail ... >> Aaron Smith wrote: ...
    (rec.music.makers.guitar.acoustic)
  • Re: Automated counting of cells without interfering with their biology??
    ... Hi David, ... How does one setup Rheinberg illumination for an inverted microscope? ... Aaron ...
    (sci.techniques.microscopy)
  • Re: view calling a view problem
    ... Thanks Aaron. ... > Hello Patrick, ... > You can only reference columns in a view that are in the SELECT list. ... >> CREATE VIEW CautionDescriptions AS ...
    (microsoft.public.sqlserver.programming)

Quantcast