Stack Overflow is a community of 4.7 million programmers, just like you, helping each other.

Join them; it only takes a minute:

Sign up
Join the Stack Overflow community to:
  1. Ask programming questions
  2. Answer and help your peers
  3. Get recognized for your expertise

I want to use the result of this query inside angular and render the result in the browser. The query is:

SELECT Student.Name, Student.Surname,Student.Major,Subject.Name,Grades.Grade    
FROM Grades
INNER JOIN Student
on Grades.StudentId = Student.Id
INNER JOIN Subject
on Grades.SubjectId = Subject.Id     

I only know the simple $http.get(url).then(function())...to render one single table, but don't know how to render the join of three related tables. Please help!

share|improve this question
    
Are you serious, sql query from UI? it should be there on server side ado.net? why ? and how can angular will help you to make a join? – Pankaj Parkar 8 hours ago
1  
Making a query to SQL server is not a feature of Angular. – Claies 8 hours ago
    
You seem to have a misunderstanding of separation of client side vs server side tasks and how database is accessed only from server side programming language – charlietfl 7 hours ago
    
@PankajParkar well that's what I'm trying to figure out, I'm a beginner. How would I render the join of three tables? Can you try to understand and help instead of being rude? thanks – AdaGranger 7 hours ago
    
@AdaGranger you should put that code on server, and expose that server code by having webservice kind of thing..webservice will comunicate with database and give data as a response..you need to make an ajax to get that data from server' – Pankaj Parkar 7 hours ago

The preferrable solution will be to have a server side service to return the data from the sql query to angular. Once the data is returned then from angular you are able to extract the contents that you are required to be rendered in the view

share|improve this answer
    
can You provide any link of similar example, please? – AdaGranger 7 hours ago

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.