mardi 3 mars 2015

Add empty column with type VARCHAR2(X) instead of CHAR(0) where X > 0


I have the following columns



|-----+-----|
| FOO | BAR |
|-----+-----|
| ... | ... |

And I want to create a view that looks as such



|-----+-----+-----|
| FOO | BAR | BAZ |
|-----+-----+-----|
| ... | ... | " " |

Where baz is a column of empty strings.


Here is what I'm currently using to make the view



CREATE VIEW V_FOOBARBAZ AS
FOO,
BAR,
'' BAZ
FROM ...


However, for some reason, the front-end application does not respond well to CHAR(0) and I would like to keep the column in the view.


I have looked at Casting the column to the VARCHAR2 type but googling has not yield any results for me.





Aucun commentaire:

Enregistrer un commentaire