Thread: Views with Where Clauses

Views with Where Clauses

From
Alex
Date:
Hi,
I have a view that has some wher clause in it.

If I call the view with SELECT * FROM viewx WHERE xxxx ;   (joining 2
tables)
then I dont get any results back although issuing the command in full
i.e. without view i get rows back.

Is it not possible to use view that way ?

Cheers
Alex



Re: Views with Where Clauses

From
Richard Huxton
Date:
On Friday 05 September 2003 10:39, Alex wrote:
> Hi,
> I have a view that has some wher clause in it.
>
> If I call the view with SELECT * FROM viewx WHERE xxxx ;   (joining 2
> tables)
> then I dont get any results back although issuing the command in full
> i.e. without view i get rows back.
>
> Is it not possible to use view that way ?

That's how they're supposed to work. Are you sure there's not some subtle
mistake in the view definition? Feel free to post it along with the query.

--
  Richard Huxton
  Archonet Ltd

Re: Views with Where Clauses

From
Alex
Date:
My apologies...
I had a Limit in the view.  So, the second where never got to a valid
record.

Thanks anyway
A

Richard Huxton wrote:

>On Friday 05 September 2003 10:39, Alex wrote:
>
>
>>Hi,
>>I have a view that has some wher clause in it.
>>
>>If I call the view with SELECT * FROM viewx WHERE xxxx ;   (joining 2
>>tables)
>>then I dont get any results back although issuing the command in full
>>i.e. without view i get rows back.
>>
>>Is it not possible to use view that way ?
>>
>>
>
>That's how they're supposed to work. Are you sure there's not some subtle
>mistake in the view definition? Feel free to post it along with the query.
>
>
>