General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Actually, it seems to work fine without the padding. I would have thought that would not work, but it does.
Well, at least I can say it does work when there is at least one non-null in the testdata group. I should test for all nulls in testdata, and maybe then it would fail.
I'll check it out.
>>If I leave out the Order By clause, it works, but the results are not ordered like I want.
>
>order by 1 and don't forget to pad with space() or padr() functions when using NVL
>
>like:
>
>Select vendor From CopyTemplateMtl
> Union All
> Select Nvl(vendor,space(10)) as vendor From c:\testdata
> Order By 1
>
>or
>
>Select vendor From CopyTemplateMtl
> Union All
> Select padr(Nvl(vendor,''),10) as vendor From c:\testdata
> Order By 1
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only