Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2007
    Location
    Manila, Philippines
    Posts
    132

    Unanswered: display the table name

    hi,
    how do I display multiple TABLE NAME in my script.
    e.g.

    Code:
    select 
    table1.date,
    table1.name,
    table1.address
    table1.TABLE1'S NAME.
    
    table2.date,
    table2.name,
    table2.address
    table2.TABLE2'S NAME.
    
    table3.date,
    table3.name,
    table3.address
    table3.TABLE3'S NAME.
    
    FROM
    table1, table2, table3
    how will i display the TABLE'S NAME and unite 3 tables?

    thanks
    Take Nothing But Pictures;
    Leave Nothing But Footprints;
    Kill Nothing But Time;

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    select .... "mytablenamer" as tablename from .......;
    but why would you want to?

  3. #3
    Join Date
    Oct 2007
    Location
    Manila, Philippines
    Posts
    132
    thanks!

    i like to monitor what process(table) my employee is doing for the whole day.

    e.g.

    empname / process
    name1 / key entry
    name1 / coding
    name 2 / scanning
    name2 / qc
    name3 / key entry
    name3 / scanning

    all process is table, they input their work in tables. and they change process everyday.

    thanks
    Take Nothing But Pictures;
    Leave Nothing But Footprints;
    Kill Nothing But Time;

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by homer.favenir
    how will i display the TABLE'S NAME and unite 3 tables?
    hardcode it

    also, it looks like you might want to try a UNION query instead of joins
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •