need to get the table name

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tamerelrefaie
    New Member
    • Jul 2007
    • 2

    need to get the table name

    Dear all,

    I'm building a query on a table and I want to make a new column in this query that shows the table name that I'm querying on infront of each record.

    please need your help... very urgent.
  • FishVal
    Recognized Expert Specialist
    • Jun 2007
    • 2656

    #2
    Originally posted by tamerelrefaie
    Dear all,

    I'm building a query on a table and I want to make a new column in this query that shows the table name that I'm querying on infront of each record.

    please need your help... very urgent.
    ????????

    SELECT 'TheTable' AS [Table Name], ..... FROM TheTable;

    Did you mean this?

    Comment

    • tamerelrefaie
      New Member
      • Jul 2007
      • 2

      #3
      Yep, exactly

      many many thanks really.



      Originally posted by FishVal
      ????????

      SELECT 'TheTable' AS [Table Name], ..... FROM TheTable;

      Did you mean this?

      Comment

      Working...