Dynamic Query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • snehsoni
    New Member
    • Dec 2006
    • 1

    Dynamic Query

    i have a #table as follows

    CREATE TABLE #ReportingNumbe rs
    (
    HeadID INT,
    EntityID INT,
    Type VARCHAR(10),
    Value DECIMAL(30,12)
    )
    a master table as follows

    CREATE TABLE HeadIDFieldMapp ing
    (
    HeadID INT,
    FieldName VARCHAR(100)
    )

    and one transaction table (vData) which have columns as all rows of table HeadIDFieldMapp ing i.e.table vData is having FieldName which are rows(value of fieldName) in table HeadIDFieldMapp ing . table #ReportingNumbe rs has field HeadID and table HeadIDFieldMapp ing has field HeadID.

    now i want to update field Value of #ReportingNumbe rs Table with the value of fields of vData table using dynamic query. how can be this done?
Working...