Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Creating Alias for Columns (is mine right or wrong)

Creating Alias for Columns (is mine right or wrong)

Creating Alias for Columns (is mine right or wrong)

I am trying to use my MSSQL knowledge to build reports for Informix and the interface I am programming in (Aqua Data Studio) does not seem to aid me in properly using syntax or where errors are in my code.  So this could be a two part question.

One is to verifiy that I am using proper aliasing in my column names.  Two is there a better application to program Informix with other than Aqua Data Studio that will help just like MSSQL has 'SQL Query Analyzer' or 'SQL Server Management Studio'?



  1                           AS 'OrdBy',
  c.callstartdate             AS 'Date',
  c.dnis                      AS 'dialed_number_id',
  'Total Number of calls'     AS 'Option',
  COUNT (DISTINCT s.callguid) AS 'Calls'

RE: Creating Alias for Columns (is mine right or wrong)

Here is a sample of what I am useing now... which works with other systems.  What am I doing wrong?  Aqua Data Studio (which is the application my office uses to pull data gives a very vague error response


SELECT distinct
  e.elementname as "element",

Full code being used


SELECT distinct
  e.elementname as "element",
  vxmlelement e
  e.elementname like 'get_taxID'
  e.elementname ASC;

Here is the error Message


>[Error] Script lines: 1-20 -------------------------
 A syntax error has occurred. 

 [Executed: 7/28/08 10:56:09 AM CDT ] [Execution: 0/ms]

RE: Creating Alias for Columns (is mine right or wrong)

Yeah, I notice that I was sending questionable with Distinct and then Group by... I guess in my efforts to debug I didn't fix that.

That is what I needed... no quotes or single quotes at all.  one last question... what do you recommend for using a label with a space?  Using underscore instead of space or is there an option to use brackets ie [ ] around the alias name with spaces?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close