Design question: where to put sql
I am making a webapp that displays stats from a database. I am leveraging the SLQ server to aggregate the data, for example to sum over months.
This means that i have multiline sql statements in the data access layer of my application. My question is, would it be nicer (better, more easily maintenable) to put the sql statements somewhere in a text file?
I was thinking maybe use resourcebundles, or something similar. This would have the added bonus of making syntax highlighting possible. (I'm working in Eclipse).
Where do you put your sql statements?