Identifying fields

  • Hello,

    I have a SQL Server 2000 View I need to set up, and I'm trying to shorten the physical length of the code by expressing a wildcard character * after an alias name for the tables in the View (to represent all fields from the given table).

    The problem is, I have two tables that share a field name, and I need an alias for at least one field name to differentiate the two fields. Is there any way that I can apply an alias to the applicable field name without having to express all of the field names in the code for the applicable table?

    Thanks!

    CSDunn

  • I don't think you can, but I'd love to be proved wrong.

    One way to solve your problem might be to split your big view up into smaller views, I.E. create perhaps a seperate view for each table aliasing the offending columns, then create a view which selects * from your two table views.

    I have found it is possible to please all of the people all of the time if you do exactly what they want. Harold Macmillan 1961


    I have found it is possible to please all of the people all of the time if you do exactly what they want. Harold Macmillan 1961

  • Thanks for your help!

    quote:


    One way to solve your problem might be to split your big view up into smaller views, I.E. create perhaps a seperate view for each table aliasing the offending columns, then create a view which selects * from your two table views.


Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply