anchor.diff:  
   (deftest :fdml/select/19
       (clsql:select [emplid] :from [employee] :order-by [emplid]
  -                           :where [between [* [emplid] 10] [* 5 10] [* 10 10]]
  -                           :field-names nil :result-types nil :flatp t)
  +			   :where [between [* [emplid] 10] [* 5 10] [* 10 10]]
  +			   :field-names nil :result-types nil :flatp t)
    ("5" "6" "7" "8" "9" "10"))
   
   (deftest :fdml/select/20
       (clsql:select [emplid] :from [employee] :order-by [emplid]
  -                           :where [not [between [* [emplid] 10] [* 5 10] [* 10 10]]]
  -                           :field-names nil :result-types nil :flatp t)
  +			   :where [not [between [* [emplid] 10] [* 5 10] [* 10 10]]]
  +			   :field-names nil :result-types nil :flatp t)
    ("1" "2" "3" "4"))
   
   (deftest :fdml/select/21
     (clsql:select [substring [first-name] 1 4] :from [employee]
  -                :flatp t :order-by [emplid] :field-names nil)
  +		:flatp t :order-by [emplid] :field-names nil)
    ("Vlad" "Jose" "Leon" "Niki" "Leon" "Yuri" "Kons" "Mikh" "Bori" "Vlad"))
   
   (deftest :fdml/select/22
      (case *test-database-underlying-type*
        (:mssql (clsql:select [+ [first-name] " " [last-name]] :from [employee]
  -                           :flatp t :order-by [emplid] :field-names nil))
  +			   :flatp t :order-by [emplid] :field-names nil))
        (t (clsql:select [|| [first-name] " " [last-name]] :from [employee]
  -                      :flatp t :order-by [emplid] :field-names nil)))
  +		      :flatp t :order-by [emplid] :field-names nil)))
    ("Vladimir Lenin" "Josef Stalin" "Leon Trotsky" "Nikita Kruschev"
    "Leonid Brezhnev" "Yuri Andropov" "Konstantin Chernenko" "Mikhail Gorbachev"
    "Boris Yeltsin" "Vladimir Putin"))
   
   (deftest :fdml/select/23
    (clsql:select [emplid] :from [employee] :where [in [emplid] '(1 2 3 4)]
  -                        :flatp t :order-by [emplid] :field-names nil
  -                        :result-types nil)
  +			:flatp t :order-by [emplid] :field-names nil
  +			:result-types nil)
    ("1" "2" "3" "4"))
   
   (deftest :fdml/select/24
    (clsql:select [distinct [first-name]] :from [employee] :flatp t
  -               :order-by [first-name] :field-names nil :result-types nil)
  +	       :order-by [first-name] :field-names nil :result-types nil)
    ("Boris" "Josef" "Konstantin" "Leon" "Leonid" "Mikhail" "Nikita" "Vladimir"
     "Yuri"))
   
  
positive.code:     (let ((now (get-universal-time)))
        (clsql:insert-records :into [employee]
         :values `(11 1 "Yuri" "Gagarin" "gagarin@soviet.org"
                      1 1 1.85 t ,(clsql:utime->time now) ,now))
        (values
         (clsql:select [first-name] [last-name] [email]
                      :from [employee] :where [= [emplid] 11])
         (progn (clsql:delete-records :from [employee] :where [= [emplid] 11])
                (clsql:select [*] :from [employee] :where [= [emplid] 11]))))
    (("Yuri" "Gagarin" "gagarin@soviet.org")) nil)
  
  ;; inserts a record using attributes and values and then deletes it
  (deftest :fdml/insert/2
      (progn
        (clsql:insert-records :into [employee]
                             :attributes '(emplid groupid first_name last_name
                                           email ecompanyid managerid)
                             :values '(11 1 "Yuri" "Gagarin" "gagarin@soviet.org"
                                       1 1))
        (values
         (clsql:select [first-name] [last-name] [email] :from [employee]
                      :where [= [emplid] 11])
         (progn (clsql:delete-records :from [employee] :where [= [emplid] 11])
                (clsql:select [*] :from [employee] :where [= [emplid] 11]))))
    (("Yuri" "Gagarin" "gagarin@soviet.org")) nil)
  
  ;; inserts a record using av-pairs and then deletes it
  (deftest :fdml/insert/3
      (progn
        (clsql:insert-records :into [employee]
                             :av-pairs'((emplid 11) (groupid 1)
                                        (first_name "Yuri")
                                        (last_name "Gagarin")
                                        (email "gagarin@soviet.org")
                                        (ecompanyid 1) (managerid 1)))
        (values
         (clsql:select [first-name] [last-name] [email] :from [employee]
                      :where [= [emplid] 11])
         (progn (clsql:delete-records :from [employee] :where [= [emplid] 11])
                (clsql:select [first-name] [last-name] [email] :from [employee]
                             :where [= [emplid] 11]))))
    (("Yuri" "Gagarin" "gagarin@soviet.org")) nil)
  
  ;; inserts a records using a query from another table
  (deftest :fdml/insert/4
      (progn
        (clsql:create-table [employee2] '(([forename] string)
                                   ([surname] string)
                                   ([email] string)))
        (clsql:insert-records :into [employee2]
                       :query [select [first-name] [last-name] [email]
                                      :from [employee]]
                       :attributes '(forename surname email))
        (prog1
            (equal (clsql:select [*] :from [employee2])
                   (clsql:select [first-name] [last-name] [email]
                                :from [employee]))
          (clsql:drop-table [employee2] :if-does-not-exist :ignore)))
    t)
  
  ;; updates a record using attributes and values and then deletes it
  (deftest :fdml/update/1
      (progn
        (clsql:update-records [employee]
                             :attributes '(first_name last_name email)
                             :values '("Yuri" "Gagarin" "gagarin@soviet.org")
                             :where [= [emplid] 1])
        (values
         (clsql:select [first-name] [last-name] [email] :from [employee]
                      :where [= [emplid] 1])
         (progn
           (clsql:update-records [employee]
                                :av-pairs'((first_name "Vladimir")
                                           (last_name "Lenin")
                                           (email "lenin@soviet.org"))
                                :where [= [emplid] 1])
           (clsql:select [first-name] [last-name] [email] :from [employee]
                        :where [= [emplid] 1]))))
    (("Yuri" "Gagarin" "gagarin@soviet.org"))
    (("Vladimir" "Lenin" "lenin@soviet.org")))
  
  
negative.code: 
  (deftest :fdml/query/5
      (let ((res (clsql:query (clsql:sql [select [first-name] [sum [emplid]] :from [employee]]
  				       [group-by [first-name]] [order-by [sum [emplid]]])
  			    :field-names nil :result-types nil)))
        (mapcar (lambda (p) (list (car p) (truncate (read-from-string (second p)))))
  	      res))
    (("Josef" 2) ("Leon" 3) ("Nikita" 4) ("Leonid" 5) ("Yuri" 6)
    ("Konstantin" 7) ("Mikhail" 8) ("Boris" 9) ("Vladimir" 11)))
  
  (deftest :fdml/query/6
      (let ((res (clsql:query (clsql:sql [union [select [emplid] :from [employee]]
  				       [select [groupid] :from [company]]])
  			    :field-names nil :result-types nil :flatp t)))
        (values (every #'stringp res)
  	      (mapcar #'(lambda (f) (truncate (read-from-string f))) res)))
    t (1 2 3 4 5 6 7 8 9 10))
  
  (deftest :fdml/query/7
      (let ((res (car (clsql:query (clsql:sql [intersect [select [emplid] :from [employee]]
  					    [select [groupid] :from [company]]])
  				 :field-names nil :result-types nil :flatp t))))
        (values (stringp res)
  	      (nth-value 0 (truncate (read-from-string res)))))
    t 1)
  
  (deftest :fdml/query/8
      (let ((res (clsql:query (clsql:sql [except [select [emplid] :from [employee]]
  				       [select [groupid] :from [company]]])
  			    :field-names nil :result-types nil :flatp t)))
        (values (every #'stringp res)
  	      (mapcar #'(lambda (f) (truncate (read-from-string f))) res)))
    t (2 3 4 5 6 7 8 9 10))
  
  
  