Topic: Aliases

Good afternoon, in comparison operator where it is impossible to use aliases?
For an example I result a small example, the error that per1 beats out the unknown identifier

select 0 as per1, 2 as per2 from dual
where per1 <> 0


Re: Aliases

RTFM c_alias (FAQ)


Re: Aliases

Understood, but conveniently it turns out, if I in select go what that condition, I to it appropriate an alias, and to me it is conditions then still it is necessary in where to apply

select (100/TRUNC (MONTHS_BETWEEN (&EndDate, &BeginDate))) as Postuplenia from dual
where (100/TRUNC (MONTHS_BETWEEN (&EndDate, &BeginDate))) <> 0


Re: Aliases

petrovichvanya wrote:

Understood, but it is convenient

RTFM inline view (FAQ)


Re: Aliases

[quote =-2] it is passed...
Worse when similar creativity fulfills without errors

SQL> select ' </> ' hr from dual htf where htf.hr = ' <hr/> ';

At function hr the parameter with  like is by default equal null....
Whence in ' <hr/> ' the slash can undertake? In my opinion the request returns result only under a condition

select ' </> ' hr from dual htf where htf.hr = ' <hr>'