.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> ADO.Net >> Post New QuestionBookmark and Share Subscribe to Forum

Subqueries

Posted By: Aamrapali Tamgadge     Posted Date: July 29, 2011    Points:5   Category :ADO.Net
Hi .I have to select Some Data like companyname,designation,location,jobcategory from table but the condition is that according to perticular jobcategory i have to first select the data related to that category and then from this i have to select the data using designation,location or other whatever the user type like a ,b,c,d whatever the user type like nagpur the related location in the related category wil have to come hw can i do this

Responses
Author: Sunil Yadav       [Moderator]      
Posted Date: July 29, 2011     Points: 20   

Hi,

Do you have any Master table for JobCategory?

Author: Gowthammanju             
Posted Date: July 29, 2011     Points: 20   

Hi,

ya use can use various joints for these purpose



Thanks & Regards,
GowthamManju
Chennai



Mark if the answer is true
Author: Gowthammanju             
Posted Date: July 29, 2011     Points: 20   
Author: Gowthammanju             
Posted Date: July 29, 2011     Points: 20   

FOR ONLINE BOOKS TRY THESE LINK AS


http://my.safaribooksonline.com/book/programming/microsoft-dotnet/0672322471/creating-transact-sql-commands/ch06lev1sec5

Thanks & Regards,
GowthamManju
Chennai



Mark if the answer is true
Author: Gowthammanju             
Posted Date: July 29, 2011     Points: 20   

tRY THESE LINK AS


http://vb.net-informations.com/ado.net-dataproviders/ado.net-executescalar-sqlcommand.htm

Thanks & Regards,
GowthamManju
Chennai



Mark if the answer is true
Author: Sasi Prabhu             
Posted Date: July 29, 2011     Points: 20   

Try

Use Sql Inner Join.



Thanks & Regards,
Sasi Prabhu.
Author: Aamrapali Tamgadge             
Posted Date: July 30, 2011     Points: 20   

hi yes me having master tables related to there values.following is my query

SELECT JobPost.Id,EmployerReg.CompanyName, JobPost.Location, JobPost.Designation, JobPost.Eligibility,JobPost.Experience, CONVERT(char(20), JobPost.LastDate, 101) AS 'LastDate', CONVERT(char(20), JobPost.Edate, 101) AS 'EDate', JobCategory.JobCategoryName FROM EmployerReg INNER JOIN JobPost ON EmployerReg.ID = JobPost.CompanyName LEFT OUTER JOIN JobCategory ON JobPost.JobCategory = JobCategory.JobCategory Where EmployerReg.CompanyName LIKE '" + keyword + "%" + "' or JobCategory.JobCategoryName LIKE '" + keyword + "%" + "' or JobPost.Designation LIKE '" + keyword + "%" + "' or JobPost.Location LIKE '" + keyword + "%" + "' or JobPost.Experience LIKE '" + keyword + "%" + "' and JobPost.JobCategory="+1+"

but using this query if i press d the related content of d wil come but my requirement is that first the category i data wil come and then from category 1 the matching data of d wil come if user press d.

Software Programmer At OTIS ISRC
Author: ashleyturnier             
Posted Date: October 11, 2013     Points: 20   

A Subquery or Inner query or Nested query is a query within another SQL query and embedded within the WHERE clause.
Subqueries may be used using the SELECT, PUT, UPDATE, and DELETE assertions combined with workers including =, <, >, >=, <=, IN, CONCERNING and so on.



Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend