Skip to content
Advertisement

SQL: Create view using multiple tables and a cursor

I have two tables : ‘pc’ and ‘results’. the table ‘results’ contains so many results of every pc. I need to create view that contains all pc columns and the last result of every pc. I’ve tried this but it didn’t work.

Do I have to use a cursor? if yes, how?

EDIT : PC ID_pc name x y 1 Station1 1 1 2 Station2 2 2

Result table:

I need a niew like this

Advertisement

Answer

I think what you are looking for is something like this:

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement