Re: selecting a date not in the range
Posted by:
tan tan
Date: January 27, 2012 06:58PM
thanks for trying sir irek, but it doesnt create the desired result..
CREATE TABLE `table1` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`checkin` varchar(45) DEFAULT NULL,
`checkout` varchar(45) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8
CREATE TABLE `table2` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`date` varchar(45) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8
INSERT INTO `test`.`table1` (`checkin`, `checkout`) VALUES ('2012-01-01', '2012-01-15');
INSERT INTO `test`.`table2` (`date`) VALUES ('2012-01-01');
INSERT INTO `test`.`table2` (`date`) VALUES ('2012-01-03');
INSERT INTO `test`.`table2` (`date`) VALUES ('2012-01-05');
INSERT INTO `test`.`table2` (`date`) VALUES ('2012-01-06');
INSERT INTO `test`.`table2` (`date`) VALUES ('2012-01-08');
INSERT INTO `test`.`table2` (`date`) VALUES ('2012-01-10');
the given answer by mr irek doesnt not show any resultset. thanks
Subject
Views
Written By
Posted
1399
January 27, 2012 08:10AM
820
January 27, 2012 05:43PM
Re: selecting a date not in the range
866
January 27, 2012 06:58PM
2659
January 28, 2012 03:16AM
1038
January 27, 2012 09:24PM
790
January 28, 2012 06:36PM
840
January 29, 2012 01:49AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.