SQL query

Results 1 to 2 of 2

Thread: SQL query

  1. #1
    Join Date
    Dec 1969

    Default SQL query

    Hello,<BR> I have the same field in two different tables which will be having diferent values. I need to write a SQL statement which selects the values by comparing both the tables but the same field. how do i write it?<BR> I can make it still more clear...i have a table which contains old jobs which is identifies by job code and one more table with new jobs again identifies by job code. i have to display the search results according to the jobcode which matches the criteria. how can i write the SQL statement to achieve what i want?<BR><BR>Thanks,<BR>keerthi

  2. #2
    Join Date
    Dec 1969

    Default RE: SQL query

    table1:<BR>jobID<BR>oldJob<BR><BR>table2<BR>jobID< BR>newJob<BR><BR>strSQL="Select t1.oldJob,t2.newJob <BR>From table1 t1,table2 t2<BR>Where t1.jobID=t2.jobID"<BR>

Posting Permissions

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