question on views...

Started by Lorenzo Huertaover 27 years ago4 messagesgeneral
Jump to latest
#1Lorenzo Huerta
lorhuerta@yahoo.com

Hi all got another question this morning,

In postgres when you create a view can you give that view a
specific range of your table to be displayed and thats it, i assume
giving a specified number of columns will work but i don't know about
the data range.

lorenzo

_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com

#2Ulf Mehlig
umehlig@uni-bremen.de
In reply to: Lorenzo Huerta (#1)
Re: [GENERAL] question on views...

Lorenzo Huerta <lorhuerta@yahoo.com> wrote:

In postgres when you create a view can you give that view a
specific range of your table to be displayed and thats it, i assume
giving a specified number of columns will work but i don't know
about the data range.

Do you mean something like

create view x
as select ccc, ddd
from y
where ccc between 4711 and 2001

(with ccc beeing a numeric type)?

Ulf

--
======================================================================
%%%%% Ulf Mehlig <ulf.mehlig@uni-bremen.de>
%%%%!%%% Projekt "MADAM" <umehlig@uni-bremen.de>
%%%% %!% %%%% ----------------------------------------------------
---| %%% MADAM: MAngrove | Center for Tropical Marine
||--%!% Dynamics | Biology
|| And | Fahrenheitstrasse 1
_ /||\_/\_ Management |
/ / \ \ ~~~~~~~~~~~~~~~~~ | 28359 Bremen/Germany
~~~~~~~~~~~~~~~~~~~~

#3Ulf Mehlig
umehlig@uni-bremen.de
In reply to: Ulf Mehlig (#2)
Re: [GENERAL] question on views...

don't believe in numbers ;-)

... between 2001 and 4711 ...

(at least when it was a biologist who told you to believe in them)

between 4711 and 2001

will result in an empty result table, anyway.

Ulf

#4Lorenzo Huerta
lorenzo@nmsu.edu
In reply to: Ulf Mehlig (#2)
Re: [GENERAL] question on views...

On Fri, 30 Oct 1998, Ulf Mehlig wrote:

Date: Fri, 30 Oct 1998 08:04:57 +0100
From: Ulf Mehlig <umehlig@uni-bremen.de>
To: lorhuerta@yahoo.com
Cc: pgsql-general@postgreSQL.org, lorenzo@nmsu.edu
Subject: Re: [GENERAL] question on views...

Lorenzo Huerta <lorhuerta@yahoo.com> wrote:

In postgres when you create a view can you give that view a
specific range of your table to be displayed and thats it, i assume
giving a specified number of columns will work but i don't know
about the data range.

Do you mean something like

create view x
as select ccc, ddd
from y
where ccc between 4711 and 2001

actually you can try having this statement:
where ccc > 2001 and ccc < 4711

(with ccc beeing a numeric type)?

Ulf

--
======================================================================
%%%%% Ulf Mehlig <ulf.mehlig@uni-bremen.de>
%%%%!%%% Projekt "MADAM" <umehlig@uni-bremen.de>
%%%% %!% %%%% ----------------------------------------------------
---| %%% MADAM: MAngrove | Center for Tropical Marine
||--%!% Dynamics | Biology
|| And | Fahrenheitstrasse 1
_ /||\_/\_ Management |
/ / \ \ ~~~~~~~~~~~~~~~~~ | 28359 Bremen/Germany
~~~~~~~~~~~~~~~~~~~~

Thanks,

__________________________________________________________________
* Lorenzo J. Huerta *
* Programming Assistant *
* Computing & Networking Networking Architecture and Operations *
* New Mexico State University *
* phone: (w)(505)646-2582 (h)(505) 521-8699 fax:(505) 646-8139 *
* e-mail: lorenzo@nmsu.edu *
* Web Site: http://web.nmsu.edu/~ljhuerta *
__________________________________________________________________