I guess this would be a nice thing to know for more SQL newbies like me :
How can I find a weeknr by a query?
I tried this:
var week = globals.gTempnr;
var query = 'SELECT tableid FROM table WHERE currentweek = ' + week ;
bla,bla,bla
the column ‘currentweek’ is a calculation that looks like this:
if(date)
{
var week = parseInt(utils.dateFormat(date, 'w'));
return week;
}
I guess the query doesn’t recognize the content from a calc, 'cause the query doesn’t return any records…