--- "Markham, Richard" <[EMAIL PROTECTED]> wrote: > thanks for everyones help. My 'example' obviously > had a few problems's =). Kimball's suggestion using > "as" was ultimately what I needed. > > ~rewrite~ > my $sql=q{ select sid||','||serial# as Sessinfo, username > from v$session };
You may have misunderstood. Adding "as" has no bearing on this, and is completely optional -- it exists solely for enhanced readability. The reason your rewrite above works is not the "as", but rather because you changed the alias name to a non-reserved word ('sessinfo' instead of 'session') In summary: OK: select sid||','||serial# as Sessinfo OK: select sid||','||serial# Sessinfo OK: select sid||','||serial# as "Session" OK: select sid||','||serial# "Session" BAD: select sid||','||serial# Session Again, the last one is disallowed because Session is a reserved word and must be quoted to use it as a column alias. __________________________________________________ Do you Yahoo!? Yahoo! Web Hosting - establish your business online http://webhosting.yahoo.com