# SQLite Error when viewing monthly archives

**URL:** <https://www.ruby-forum.com/t/sqlite-error-when-viewing-monthly-archives/107120>\
**Category:** Radiant CMS\
**Created:** [June 18, 2007, 12:17pm UTC](https://www.ruby-forum.com/t/sqlite-error-when-viewing-monthly-archives/107120 "2007-06-18T12:17:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vfcforums](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/85e7bf/32.png) [@vfcforums](https://www.ruby-forum.com/u/vfcforums)\
**Post date:** [June 18, 2007, 12:17pm UTC](https://www.ruby-forum.com/t/sqlite-error-when-viewing-monthly-archives/107120/1 "2007-06-18T12:17:37Z")

</div>

When I try to view the monthly archives I get this error:

SQLite3::SQLException: near “AS”: syntax error: SELECT \* FROM pages  
WHERE (pages.parent\_id = 4 AND ((((virtual = ‘f’) and (status\_id =  
100)) AND (CAST(STRFTIME(’%m’, published\_at) AS INTEGER) = 6)) AND  
(CAST(STRFTIME(’%Y’, published\_at) AS INTEGER) = 2007))) ORDER BY  
published\_at DESC, virtual DESC, title ASC

My Radiant set up was setup under a custom Ruby ROR install at  
Dreamhost. It is setup with the SQLite3 GEM.

Is the offending code compatible with the SQLite SQL implementation?  
Does that code have to be rewritten for SQLite 3?

/voipfc
