yes you are correct. I had gotten confused between trying q, qq and what not and had built the example quickly without testing. I had thought that as was what saved the day. Thanks for the clarification =).
-----Original Message----- From: M. Addlework [mailto:[EMAIL PROTECTED] Sent: Friday, March 14, 2003 1:55 PM To: Markham, Richard; '[EMAIL PROTECTED]' Subject: RE: concatenating & column aliasing --- "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