Click here to Skip to main content
15,893,588 members

Comments by RAMASWAMY EKAMBARAM (Top 26 by date)

RAMASWAMY EKAMBARAM 17-Oct-17 1:46am View    
Deleted
In addition to the tips (solutions 1 and 2) you may need to ignore all the comment characters as '{' and '}' could be included in comments.
RAMASWAMY EKAMBARAM 30-Sep-17 2:50am View    
You can get rid of possible "rubbish in the input queue" using fflush(...)
RAMASWAMY EKAMBARAM 29-Aug-17 1:16am View    
"for more than 1 machine" - I did not overlook the requirement but you can complete it yourself. Instead of querying for a particular machine ("where machine = '500'") you will have to select the machine for each of the days (in my example I have done it only for 'monday') and alias as 'mch_mon', 'mch_tue' .. and in the condition for joining the sub queries you will need to match the machines (mch_mon = mch_tue) in addition to matching the dates.
The only drudgery is that you will need to spell out the individual columns (aliases) for each day rather than simply writing mon.*, tue.* ...!
RAMASWAMY EKAMBARAM 28-Aug-17 2:00am View    
char s1[100000] and s2[100000] - even if your system has 8GB of RAM do you get 200000 bytes of stack by default i.e. without using any special directives while compiling? As this memory is needed only within this function, I think you should declare char *s1, *s2 and use malloc().
RAMASWAMY EKAMBARAM 23-Aug-17 5:32am View    
Your requirement will be clearer if you explain with reference to the above data, what you mean by getting 6 wrt column 'value' and 2 & 3 wrt 'value2'. In fact there is no reference to column 'value2' in your query.