jess Posted December 6, 2007 Report Share Posted December 6, 2007 hi alli'm new to sql and i'm creating a hoilday. i need to create a query to show all the sites visited with a difficulty description longer than 6 characters which only displays the sites once. can any one help me with this because i have no idea.thanksjessica Link to comment Share on other sites More sharing options...
Synook Posted December 6, 2007 Report Share Posted December 6, 2007 Umm... a holiday in SQL? :)Well, if you are using MySQL you can utilise the LEN() function to find out the length of a field, e.g. SELECT * FROM sites WHERE LEN(difficulty_desc) > 6 Link to comment Share on other sites More sharing options...
jess Posted December 6, 2007 Author Report Share Posted December 6, 2007 Umm... a holiday in SQL? :)Well, if you are using MySQL you can utilise the LEN() function to find out the length of a field, e.g.SELECT * FROM sites WHERE LEN(difficulty_desc) > 6 hithank you i'll try thatthanksjess Link to comment Share on other sites More sharing options...
jess Posted December 6, 2007 Author Report Share Posted December 6, 2007 hii was wondering if anyone knows how to create a query which shows the hoilday and site details that commence in the calender month that follows the current month. thanks jessica Link to comment Share on other sites More sharing options...
justsomeguy Posted December 6, 2007 Report Share Posted December 6, 2007 I'm not sure which database you're using, but this should work for a MySQL database:SELECT * FROM table WHERE MONTH(date_column) = MONTH(DATE_ADD(CURDATE(), INTERVAL 1 MONTH)) AND YEAR(date_column) = YEAR(DATE_ADD(CURDATE(), INTERVAL 1 MONTH)) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now