Problem with simple SQL query :D
-
Hi there I'm playing around on SQL server 2000 and I get a error when i try to run this query: SELECT *, COUNT(P.PTICKETNO) AS counter from TICKETS_PURCHASED T,PASSENGER P WHERE P.PTICKETNO = T.TKTNO AND T.TKTNO = 'TKT000000000001' The error is as such. Column 'T.TKTNO' is invalid in the select list because it is not contained in an aggregate function and there is no GROUP BY clause. What could be the problem guys . My SQL is very weak and I' just getting my feet wet, I would appreciate all the help :)
-
Hi there I'm playing around on SQL server 2000 and I get a error when i try to run this query: SELECT *, COUNT(P.PTICKETNO) AS counter from TICKETS_PURCHASED T,PASSENGER P WHERE P.PTICKETNO = T.TKTNO AND T.TKTNO = 'TKT000000000001' The error is as such. Column 'T.TKTNO' is invalid in the select list because it is not contained in an aggregate function and there is no GROUP BY clause. What could be the problem guys . My SQL is very weak and I' just getting my feet wet, I would appreciate all the help :)