Using right() in a view
| От | Chrishelring |
|---|---|
| Тема | Using right() in a view |
| Дата | |
| Msg-id | 1306159836605-4419141.post@n5.nabble.com обсуждение |
| Ответы |
Re: Using right() in a view
|
| Список | pgsql-general |
Hi all,
please foregive me for this rather trivial question, but I´ve worked in it
for quite som time and could use som help now. :)
I have a table where it want to create a idkey using our municipality number
+ the road number + the housenumber.
The municipality and housenumber is in a fixed size, so they are okay. But
the road number differs from two digits up to four. I was then thinking
about doing something like this:
CREATE OR REPLACE VIEW test AS
SELECT
right(cast('000' as text) || cast(road_number as text), 4) AS GEO_ADRESSE
FROM rk_ois.bbrbygning
WHERE ejerlav <> 0
to ensure that the road_number would be a fixed size (four digitis).
Unfortunately this doesn't work.
Any idea on how to solve this?
Christian
--
View this message in context: http://postgresql.1045698.n5.nabble.com/Using-right-in-a-view-tp4419141p4419141.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.
В списке pgsql-general по дате отправления: