it's query, not querie
it's a language statement that you pass to a database in order to interact with the data in the database
usually it's a SELECT statement, but of course there are situations where you'll want to UPDATE, INSERT, or DELETE
many sql statements are fairly straightforward, e.g.
select Trim(Str(
iif( sum(cutoff) = 0, 1, sum(cutoff) )
)) as thecutoffweek
FROM cutoffdates
here's one that's a bit more complex --
select Trim(Str(cutoffdates.weekno)) AS weekstr
, Iif ( Format(cutoffdate, 'h:nn')='12:00'
, Format(cutoffdate, 'dddd mmm d, yyyy') & ' -- 12:00 Noon'
, Format(cutoffdate, 'dddd mmm d, yyyy -- h:nn am/pm')
) AS cutoffday
, Format(games.gamedate, 'dddd mmm d, yyyy')
AS gameday
, games.gameno
, Trim(Str(games.gameno)) AS gamestr
, games.vteam
, away.teamcity AS visitor
, games.spread
, games.hteam
, home.teamcity AS hometeam
FROM ( (cutoffdates INNER JOIN games
ON cutoffdates.weekno = games.weekno)
INNER JOIN teams AS away
ON games.vteam = away.teamabbr )
INNER JOIN teams AS home
ON games.hteam = home.teamabbr
WHERE cutoffdates.weekno = #variables.whichweek#
ORDER BY gameno
good luck
rudy