SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 combining 2 select stmts
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

svibuk
Yak Posting Veteran

60 Posts

Posted - 02/16/2013 :  06:23:45  Show Profile  Reply with Quote
in asp.net i hve gridview with checkbox populated with data as
select d.id,d.name,d.age,h.height,p.photo from details d
inner join m_height h on m.height=h.height inner join m_photo p on p.id=m.id

the selected data[ checked data] from gridview is saved in another table
sel_details as insert into sel_details(sid)values(checkedbox id)

when the page is loaded next time i need that checkbox to be checked whose id is stored as sid in sel_details along with the rest of data

visakh16
Very Important crosS Applying yaK Herder

India
52249 Posts

Posted - 02/16/2013 :  07:13:38  Show Profile  Reply with Quote
this is not a sql question. this need to be done at frond end ie through asp.net code. from sql, you just need to retrieve the set details


ie select sid from sel_details

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

svibuk
Yak Posting Veteran

60 Posts

Posted - 02/16/2013 :  07:58:09  Show Profile  Reply with Quote
thanks

was thinking if the 2 select stmts culd be combined to obtain the needed output
but i think i need to do it seperately and retrive in front end
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52249 Posts

Posted - 02/16/2013 :  08:53:43  Show Profile  Reply with Quote
yep...Indeed

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 1.58 seconds. Powered By: Snitz Forums 2000