|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
SQL query help"SELECT Fname AS First, Lname AS Last, Email, Address, City, State, Zip, " + "Company, Phone, users_surveys.Datefield as Date, " + "CASE WHEN questionID = 1 THEN answer ELSE NULL END AS Reseller, " + "CASE WHEN questionID = 2 THEN answer ELSE NULL END AS Business, " + "CASE WHEN questionID = 3 THEN answer ELSE NULL END AS Product, " + "CASE WHEN questionID = 4 THEN answer ELSE NULL END AS 'Receive Literature' " + "FROM users, users_surveys " + "WHERE users.userID = users_surveys.userID"; ------------------- The issue is that the CASE statements put each question into a separate row. Is there anyway to force it to all be in the same row? TIA |
|||||||||||||||||||||||