Click here to Skip to main content
15,916,091 members
Home / Discussions / Database
   

Database

 
AnswerRe: How to get last 3 values from Mysql table Pin
Snehasish_Nandy1-Feb-14 0:09
professionalSnehasish_Nandy1-Feb-14 0:09 
GeneralRe: How to get last 3 values from Mysql table Pin
Member 102635191-Feb-14 1:06
Member 102635191-Feb-14 1:06 
AnswerRe: How to get last 3 values from Mysql table Pin
Eddy Vluggen1-Feb-14 7:13
professionalEddy Vluggen1-Feb-14 7:13 
QuestionPrevent users from playing with MySQL database Pin
Jassim Rahma30-Jan-14 10:21
Jassim Rahma30-Jan-14 10:21 
AnswerRe: Prevent users from playing with MySQL database Pin
Mycroft Holmes30-Jan-14 15:52
professionalMycroft Holmes30-Jan-14 15:52 
AnswerRe: Prevent users from playing with MySQL database Pin
Eddy Vluggen30-Jan-14 22:30
professionalEddy Vluggen30-Jan-14 22:30 
AnswerRe: Prevent users from playing with MySQL database Pin
Jörgen Andersson30-Jan-14 22:31
professionalJörgen Andersson30-Jan-14 22:31 
QuestionComplex SQL Query for Inventory. Need Help Pin
chichocojo29-Jan-14 12:35
chichocojo29-Jan-14 12:35 
Hi, I need some guidance on the following scenario:

I need to create a historic inventory of number of rooms sold per hotel.

A transactional table stores data in the following columns

IdHotel, CheckInDate, CheckOutDate, NoRooms

I need to generate a table with 365 records/days per year per hotel as follows:

hotel1, 01/Jan/2014, 1 room
hotel1,02/Jan/2014,2 rooms
hotel1,03/Jan/2014,2 rooms
hotel1,04/Jan/2014,0 rooms
.
.
.
.
.
.
hotel1, 01/Nov/2014, 1 room
hotel1, 02/Nov/2014, 1 room
hotel1, 03/Nov/2014, 1 room
.
.
.
.
.

I am a bit lost as to how to approach this problem for a solution.

I do not need the actual code. Just a hint on how to solve this problem.
AnswerRe: Complex SQL Query for Inventory. Need Help Pin
Mycroft Holmes29-Jan-14 17:40
professionalMycroft Holmes29-Jan-14 17:40 
AnswerRe: Complex SQL Query for Inventory. Need Help Pin
khun_panya29-Jan-14 19:01
khun_panya29-Jan-14 19:01 
AnswerRe: Complex SQL Query for Inventory. Need Help Pin
King Fisher30-Jan-14 2:12
professionalKing Fisher30-Jan-14 2:12 
SuggestionRe: Complex SQL Query for Inventory. Need Help Pin
Richard Deeming30-Jan-14 2:24
mveRichard Deeming30-Jan-14 2:24 
Questiondatabase projects Pin
dexter.nmn29-Jan-14 1:12
dexter.nmn29-Jan-14 1:12 
AnswerRe: database projects Pin
Mycroft Holmes29-Jan-14 17:33
professionalMycroft Holmes29-Jan-14 17:33 
QuestionOptimizing a query Pin
mrkeivan28-Jan-14 19:37
mrkeivan28-Jan-14 19:37 
AnswerRe: Optimizing a query Pin
Jörgen Andersson29-Jan-14 1:44
professionalJörgen Andersson29-Jan-14 1:44 
QuestionWould an index make this query faster? Pin
khun_panya27-Jan-14 18:42
khun_panya27-Jan-14 18:42 
AnswerRe: Would an index make this query faster? Pin
Mycroft Holmes27-Jan-14 21:00
professionalMycroft Holmes27-Jan-14 21:00 
AnswerRe: Would an index make this query faster? Pin
Shameel27-Jan-14 22:43
professionalShameel27-Jan-14 22:43 
GeneralRe: Would an index make this query faster? Pin
khun_panya29-Jan-14 6:23
khun_panya29-Jan-14 6:23 
AnswerRe: Would an index make this query faster? Pin
GuyThiebaut28-Jan-14 3:32
professionalGuyThiebaut28-Jan-14 3:32 
GeneralRe: Would an index make this query faster? Pin
Jörgen Andersson28-Jan-14 9:11
professionalJörgen Andersson28-Jan-14 9:11 
QuestionAnalyser index recommendations Pin
vkEE27-Jan-14 8:32
vkEE27-Jan-14 8:32 
AnswerRe: Analyser index recommendations Pin
Mycroft Holmes27-Jan-14 12:04
professionalMycroft Holmes27-Jan-14 12:04 
AnswerRe: Analyser index recommendations Pin
Shameel27-Jan-14 22:31
professionalShameel27-Jan-14 22:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.