If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Day function with Group By in Informix

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-16-08, 08:50
denizcaglar denizcaglar is offline
Registered User
 
Join Date: Dec 2008
Posts: 12
Day function with Group By in Informix

Hi,

ı am trying to write an sql statement in informix, but it gives error.
Does Informix not support using day function with Group By statement ?

If not, is there a workaround ?

Statement is:

select day(call.startdatetime) , count(*) from call
where month(call.callstartdate) = 11
group by day(call.startdatetime);

Thanks.
Reply With Quote
  #2 (permalink)  
Old 12-16-08, 10:42
mjldba mjldba is offline
Registered User
 
Join Date: Dec 2003
Location: North America
Posts: 139
You can use group by 1 in your "group by" statement with 1 representing the first column_name listed in your select statement.

Same rule applies when using an "order by" statement.
Reply With Quote
  #3 (permalink)  
Old 12-16-08, 12:40
denizcaglar denizcaglar is offline
Registered User
 
Join Date: Dec 2008
Posts: 12
Thank you
Reply With Quote
  #4 (permalink)  
Old 12-16-08, 13:05
mjldba mjldba is offline
Registered User
 
Join Date: Dec 2003
Location: North America
Posts: 139
you're very welcome, glad to help
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On