0

I was searching for a result, but I didn't find proper solutions.

So, I will put my problem across. Please tell, if its already listed in any of the topics !

I have one table, table123, which has columns like,

Old_variable
New_Variable
ValueDesc
Default_Value

There is another table, t6, which has columns like,

template_code
Paragraph_code
Old_Var
New_var

This table has values, multiple times, the same paragraph code, in other templates.

Now, I want to join these two tables, based on New_variable and New_var and I want a result like, which has template_code, paragraph_code, New_variable and the corresponding values of variable description and default value. And only the paragraphs, should be present only once. If it is present in one template, it need not come in other template.

Is this a possible query through MySQL?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Manikandan
  • 417
  • 4
  • 8
  • 18
  • In short yes it would be possible. The problem is that your question does not have enough detail. Please post table definitions etc. – Namphibian May 07 '12 at 06:45
  • SELECT t6.template_code, t6.paragraph_code, table123.New_variable, table123.ValueDesc,table123.Default_Value from table123, t6 where t6.New_var = table123.New_Variable; if i give this statement, i expect that the tables to be joined, but, I am getting empty set as the result. I will just update my question. – Manikandan May 07 '12 at 15:15

0 Answers0