insert values in to table and and save using storedprocedue

  • now i have two tables

    select EmpId,EmpFirstName,EmpLastName,EmpDeptNo,EmpAddress,EmpCity,EmpState,EmpZipCode,EmpCounty from emptt// first table

    select EmpDeptNo,EmpDeptName from depmt// second table

    select emptt.EmpId,emptt.EmpFirstName,emptt.EmpLastName,emptt.EmpAddress,emptt.EmpCity,emptt.EmpState,emptt.EmpZipCode,emptt.EmpCountry,depmt.EmpdeptName from emptt,depmt where emptt.EmpDeptNo=depmt.EmpDeptNo //third table

    now ineed to create sp that insertvalues in to the third table and save but the EmpDeptName should not be visible in the backend actually i had to create comboboxcolumn for EmpDeptName which i created for EmpDeptName but ineed to have values to it in the front end no need of editing it but it should not be visible in the backend. how is that possible i ve been working on it for a lot of time can u plz help me out if u do not understand plz let me know.

  • Please use capitals, punctuation and linefeeds for readability!!!

    Can't you just leave the EmpDeptName out of the third query??

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • Wow, need to beautify your code

    SELECT EmpId

    ,EmpFirstName

    ,EmpLastName

    ,EmpDeptNo

    ,EmpAddress

    ,EmpCity

    ,EmpState

    ,EmpZipCode

    ,EmpCounty

    FROM emptt

    -- first table

    SELECT EmpDeptNo

    ,EmpDeptName

    FROM depmt

    -- second table

    SELECT emptt.EmpId

    ,emptt.EmpFirstName

    ,emptt.EmpLastName

    ,emptt.EmpAddress

    ,emptt.EmpCity

    ,emptt.EmpState

    ,emptt.EmpZipCode

    ,emptt.EmpCountry

    ,depmt.EmpdeptName

    FROM emptt

    ,depmt

    WHERE emptt.EmpDeptNo = depmt.EmpDeptNo --third table

    What was the question again?

    SQLServerNewbieMCITP: Database Administrator SQL Server 2005
  • how can i just leave "EmpDeptName" well i need that column now i dealing is with a "grid"

    which can handle one table and i need to edit and save the values.Can u plz help me out

    .Thank u for ur help and response Hanshi.

  • well thanks for ur response but wat part of my question u werent clear with Mr.Jerry

  • swapshines9 (9/24/2008)

    Now I need to create sp that insert values in to the third table and save, but the EmpDeptName should not be visible in the backend. Actually I had to create a comboboxcolumn for EmpDeptName which i created for EmpDeptName. But I need to have values to it in the front end. No need of editing it, but it should not be visible in the backend. How is that possible? I've been working on it for a lot of time. Can u plz help me out? If u do not understand, plz let me know.

    If you need the value of EmpDeptName in the front-end, you have to see if it's possible to hide the column (in the combobox and/or the grid) in the frontend. You can't solve this with SQL in the backend.

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • What do you mean by "invisible in the backend"? Maybe you are looking for some encryption, so that if someone runs a query, that person will not see actual data in the column (just some unreadable rubbish) - but the data will be displayed and editable in certain application?

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply