Hi,
I need to form an SQL query to fetch the values from table A where conditions are satisfied. These conditions are stored in Table A itself in a column called "condition"
Could some one please help to form the query on this?
My table structure is as given
Table1: documentList
Field1: ID
Field2roduct_Name
Field3:condition
Field4ocument_Name
Table2: Department
field:ID
Field2: Dept_Name
Field3ept_Type
Field_type_Dept_code
the resultant value should fetch all the document_name where condition in condition column satisfies the result.
Note: Condition values are field name of Table 2 extactly same what we put in "WHERE" clause.
Sample Values in Table1 is
ID Product_Name Condition Document_name
1 Books Table2.Dept_code='101' Book1
2 Books Table2.Dept_code='102' Book2
3 laptop Table2.Dept_Type='IT' laptop1
I need a SQL query from above to get all records where condition in Table1 is such that Table2.Dept_code='101' satisfied
plz help
I need to form an SQL query to fetch the values from table A where conditions are satisfied. These conditions are stored in Table A itself in a column called "condition"
Could some one please help to form the query on this?
My table structure is as given
Table1: documentList
Field1: ID
Field2roduct_Name
Field3:condition
Field4ocument_Name
Table2: Department
field:ID
Field2: Dept_Name
Field3ept_Type
Field_type_Dept_code
the resultant value should fetch all the document_name where condition in condition column satisfies the result.
Note: Condition values are field name of Table 2 extactly same what we put in "WHERE" clause.
Sample Values in Table1 is
ID Product_Name Condition Document_name
1 Books Table2.Dept_code='101' Book1
2 Books Table2.Dept_code='102' Book2
3 laptop Table2.Dept_Type='IT' laptop1
I need a SQL query from above to get all records where condition in Table1 is such that Table2.Dept_code='101' satisfied
plz help