Jump to content

Regarding SQL Query

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
3 replies to this topic

#1
Goodluck

Goodluck

    Newbie

  • Members
  • PipPip
  • 16 posts
Hello,

I am creating two temporary tables "tableCon11" and "tableCon12" having same fields "stn_cde", "emp_dept_desc", "amount". I have kept one table empty and other table containing a single record. I have to combine these two tables.

How can I write the query?:confused: Please guide.

Thank you.

#2
Guest_Jordan_*

Guest_Jordan_*
  • Guests
If one table is empty what is there to combine?

#3
Goodluck

Goodluck

    Newbie

  • Members
  • PipPip
  • 16 posts
Hello,

Even if there is one table empty and another containing a single record, when I will run the query to combine these two tables then the resulting resultset must contain a single record. But when I actually used to run it, it shows no record. That's why I need a format for the query to combine these two tables having the same fields. Please guide.

Thanks.

#4
acccapulco

acccapulco

    Newbie

  • Members
  • Pip
  • 5 posts
You can refer to your tables as tableCon11.stn_cde and tableCon12.stn_cde
ex: SELECT * FROM tableCon11, tableCon12 WHERE tableCon11.stn_cde=tableCon12.stn_cde;