Home Datapipelines
New Blog Posts: Merging Reports - Part 1 and Part 2

Creating Expressions with Alias Assigned

edited November 2007 in Datapipelines
What would be the proper way to add expressions with the sql alias assigned
using daSqlBuilder?

Thanks.
Bill Brittain

Comments

  • edited November 2007
    Hi Bill,

    When using the TdaSQLBuilder.AddAutoSearch routine you can define the table
    and/or field using the name or the alias. Both should work correctly.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited November 2007
    Nico,

    Not an AutoSearch, just a function instead of a field in the select
    statement.

    If I am adding an function expression ( such as GetInvoiceTotal(
    Contracts.InvoiceNumber ), it does not seem to allow an alias at the
    AddExpression. What should I do to add the alias name? At the point of the
    add. The other calculation expressions such as Sum allow an alias.

    Thanks.
    Bill Brittain




  • edited November 2007
    Hi Bill,

    Thanks for the clarification. The AddExpression returns a TdaCalculation
    object which is a descendent of the TdaField class. After you call
    AddExpression you can manually assign the TdaField.FieldAlias property to
    show the required value.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.