added LEFT and RIGHT sql functions
[clsql.git] / sql / operations.lisp
index 3357761e53a257312bf9ce93793dcdcededb3127..3270a83b3bcfdb1ef1a9d87905fe91a44a76b8d9 100644 (file)
   (make-instance 'sql-function-exp
                  :name 'coalesce :args rest))
 
+(defsql sql-left (:symbol "left") (&rest rest)
+       "mssqlserver uses this to get the left n chars of a string"
+  (make-instance 'sql-function-exp
+                 :name 'left :args rest))
+
+(defsql sql-right (:symbol "right") (&rest rest)
+       "mssqlserver uses this to get the right n chars of a string"
+  (make-instance 'sql-function-exp
+                 :name 'right :args rest))
+
 (defsql sql-nvl (:symbol "nvl") (&rest rest)
   (if (= (length rest) 2)
       (make-instance 'sql-function-exp