r/DatabaseHelp • u/Cloud_The_Stampede • Oct 02 '16
Help with SQL server 2014 Select clauses.
I have an assignment that has been driving me crazy, I have been researching online with helpful information but I believe is beyond my comprehension.
I have two tables one has information about items containing the price of the item, the second has information about the vendor with company name information.
The statement I am supposed to write is going to give me results with data that has greater than 1000$ in price and contain the name "new" in the vendor list.
So far I have:
select ItemID, ItemDescription, CompanyName
from ITEM, VENDOR
Where ItemPrice > 1000 Having like 'New';
I kept getting syntax errors and again have tried to research the problem with no luck please help!
View all comments
Show parent comment
1
u/Is_At_Work Oct 02 '16
Leave a blank line before and after any code and indent code lines with 4 spaces, e.g.
EDIT: Also note my formatting is how I personally like to format. Plenty of people put commas at the end instead and I also prefer capital keywords.