Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. problem related to database

problem related to database

Scheduled Pinned Locked Moved ASP.NET
databasehelp
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    biswa47
    wrote on last edited by
    #1

    i have a table named emp. where one coloumn named "status", which doesnot take any value from the front end.i am storing its default valus as"ON" in the emp table which is set in its cloumn property . and another table emp_detail where one column named "eligible".( both tables are related with each other by "emp_id" coloumn)where it takes the value from the frontend either "Y" or "N".now i want if the value for "eligible" is stored as "Y".then the corresponding record of that in the "emp"table should be updated that is only the "status " column set to be OFF. where it takes the value from the frontend either "Y" or "N". now i want if the value for "eligible" is stored as "Y".then the corresponding record of that in the "emp"table should be updated that is only the "status " column set to be OFF.

    P 1 Reply Last reply
    0
    • B biswa47

      i have a table named emp. where one coloumn named "status", which doesnot take any value from the front end.i am storing its default valus as"ON" in the emp table which is set in its cloumn property . and another table emp_detail where one column named "eligible".( both tables are related with each other by "emp_id" coloumn)where it takes the value from the frontend either "Y" or "N".now i want if the value for "eligible" is stored as "Y".then the corresponding record of that in the "emp"table should be updated that is only the "status " column set to be OFF. where it takes the value from the frontend either "Y" or "N". now i want if the value for "eligible" is stored as "Y".then the corresponding record of that in the "emp"table should be updated that is only the "status " column set to be OFF.

      P Offline
      P Offline
      Panchal Hardik
      wrote on last edited by
      #2

      you can change the status while inseting the data in emp_detail table. Or you can create a triger on emp_detail table on insert and check the eligible column and update emp table as per value Hardik Panchal

      B 2 Replies Last reply
      0
      • P Panchal Hardik

        you can change the status while inseting the data in emp_detail table. Or you can create a triger on emp_detail table on insert and check the eligible column and update emp table as per value Hardik Panchal

        B Offline
        B Offline
        biswa47
        wrote on last edited by
        #3

        i dont know how to write trigger.but know the storeprocedure,so can let me know howto write the trigger for that

        1 Reply Last reply
        0
        • P Panchal Hardik

          you can change the status while inseting the data in emp_detail table. Or you can create a triger on emp_detail table on insert and check the eligible column and update emp table as per value Hardik Panchal

          B Offline
          B Offline
          biswa47
          wrote on last edited by
          #4

          how cani change the status of the table. can you be little elaborate it. or if possible do write the code .. or the trigger

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups