Results 1 to 2 of 2

Thread: querries!!!

  1. #1
    Join Date
    Nov 2002
    Redondo Beach Ca

    Unanswered: querries!!!

    Im trying to work myself into some advanced hacks but they all require running a "querie" can some one please explain this to me...I know im probably an idiot, but I really could use the answer..Im dieing to add these hacks

  2. #2
    Join Date
    Apr 2002
    Toronto, Canada
    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


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts