locked
Match Master table with View and insert into new output Table RRS feed

  • Question

  • User-471420332 posted

    Below is my alert master table where form fields of View_Candidateinfo will match

    Table_AlertMaster

    Sno ColumnName             Value   
     1   TeachersAvailable      Sometimes       
     2   CameraAvailable         No
     3   WaterFacility           No

    Below is my View to match the how many alerts are avaible and insert into Table_Output

    View_Candidateinfo

    CandidateId    FullName    Mobile        TeachersAvailable      CameraAvailable    WaterFacility
      1            Mazhar    7207542655        Yes                     No                   No

    I want output like below to inset record into new table(Table_Output)

    Table_Output

    CandidateId       ColumnName           Value   
       1              CameraAvailable       No                                        
       1              WaterFacility         No
    Sunday, July 7, 2019 7:50 PM

All replies

  • User-719153870 posted

    Hi mazhar khan india,

    In SQL, a view is a virtual table based on the result-set of an SQL statement.

    The fields in a view are fields from one or more real tables in the database.

    However, from the View_Candidateinfo you provide, it is difficult to guess where the first three columns came from and how the last three columns were assigned.

    Are there any other tables that you did not provide?

    If you can provide more detailed information about how you set your View_Candidateinfo, it may help us solve your problems as soon as possible.

    Best Regard,

    Yang Shen

    Tuesday, July 9, 2019 2:20 AM