Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.api/src/main/java/org/gvsig/fmap/dal/DataManager.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.api/src/main/java/org/gvsig/fmap/dal/DataManager.java	(revision 46099)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.api/src/main/java/org/gvsig/fmap/dal/DataManager.java	(revision 46100)
@@ -101,6 +101,8 @@
     public static final String FUNCTION_INSERT_INTO_TABLE = "INSERT_INTO_TABLE";
     public static final String FUNCTION_CREATE_TABLE = "CREATE_TABLE";
     public static final String FUNCTION_CREATE_TABLE_STRUCTURE = "CREATE_TABLE_STRUCTURE";
+    public static final String FUNCTION_SELECT_FROM_SELECTION = "SELECTFROMSELECTION";
+    public static final String FUNCTION_SELECT_COUNT_FROM_SELECTION = "SELECTCOUNTFROMSELECTION";
     
     public static final String DAL_PREFERRED_COLUMNS = "DAL.Preferred.Columns";
     
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/dataaccess/SelectFromSelectionFunction.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/dataaccess/SelectFromSelectionFunction.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/dataaccess/SelectFromSelectionFunction.java	(revision 46100)
@@ -0,0 +1,155 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2020 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+package org.gvsig.expressionevaluator.impl.function.dataaccess;
+
+import java.util.function.Predicate;
+import org.apache.commons.lang3.Range;
+import org.gvsig.expressionevaluator.Code;
+import org.gvsig.expressionevaluator.Codes;
+import org.gvsig.expressionevaluator.ExpressionRuntimeException;
+import org.gvsig.expressionevaluator.Interpreter;
+import org.gvsig.expressionevaluator.Optimizer;
+import org.gvsig.expressionevaluator.impl.DALFunctions;
+import org.gvsig.fmap.dal.feature.FeatureStore;
+import org.gvsig.fmap.dal.impl.expressionevaluator.DefaultFeatureExpressionEvaluator;
+import org.gvsig.expressionevaluator.Code.Callable;
+import static org.gvsig.fmap.dal.DataManager.FUNCTION_SELECT_FROM_SELECTION;
+import org.gvsig.fmap.dal.feature.FeatureSet;
+import org.gvsig.tools.evaluator.EvaluatorData;
+import org.gvsig.tools.evaluator.EvaluatorException;
+import org.gvsig.tools.util.FilteredIterator;
+import org.gvsig.tools.util.LimitIterator;
+
+/**
+ *
+ * @author jjdelcerro
+ */
+@SuppressWarnings("UseSpecificCatch")
+public class SelectFromSelectionFunction
+        extends AbstractSelectFunction
+        implements Optimizer.FunctionOptimizer {
+
+    public SelectFromSelectionFunction() {
+        super(DALFunctions.GROUP_DATA_ACCESS,
+                FUNCTION_SELECT_FROM_SELECTION,
+                Range.is(5),
+                "Returns a list of features of the table by applying the filter, order and limit indicated.\n"
+                + "The syntax is:\n\n"
+                + "SELECT * FROM SELECTION [IF NOT EMPTY] OF table_name WHERE boolean_expression ;\n\n"
+                + "Indicate a filter expression with WHERE.\n"
+                + "You can use an asterisk or enter the column names you want to retrieve separated by commas.\n"
+                + "The SELECT statement must always end with a semicolon.",
+                "SELECT * FROM SELECTION OF table_name WHERE boolean_expression ;",
+                new String[]{
+                    "column_names/asterisk - Names of the columns table to retrieve.",
+                    "table_name - Name of the table",
+                    "filter - Optional, boolean expression to apply as filter",
+                },
+                "Iterable",
+                false
+        );
+    }
+
+    @Override
+    public boolean isHidden() {
+        return false;
+    }
+
+    @Override
+    public boolean allowConstantFolding() {
+        return false;
+    }
+
+    @Override
+    public boolean useArgumentsInsteadObjects() {
+        return true;
+    }
+
+    @Override
+    public Object call(Interpreter interpreter, Object[] args) throws Exception {
+        throw new UnsupportedOperationException();
+    }
+
+    private static final int COLUMNS = 0;
+    private static final int TABLE = 1;
+    private static final int WHERE = 2;
+    private static final int LIMIT = 3;
+    private static final int SELECCTION_IF_NOT_EMPTY = 4;
+
+    @Override
+    public Object call(Interpreter interpreter, Codes args) throws Exception {
+
+        Code columns = getTupleOrNull(args, COLUMNS);
+        String storeName = this.getTableName(args, TABLE);
+        Code where = this.getWhereCode(args, WHERE);
+        Number limit = (Number) getObject(interpreter, args, LIMIT);
+        Object selection_if_not_empty = getObject(interpreter, args, SELECCTION_IF_NOT_EMPTY);
+        
+        
+        FeatureStore featureStore;
+        try {
+            featureStore = this.getFeatureStore(storeName);
+            if (featureStore == null) {
+                throw new ExpressionRuntimeException("Cant locate the feature store '" + storeName + "' in function '" + this.name() + "'.");
+            }
+            Iterable features = featureStore.getFeatureSelection();
+            if( ((FeatureSet)features).isEmpty() ) {
+                if( selection_if_not_empty != null ) {
+                    features = featureStore.getFeatureSet();
+                    // En este caso habria que optimizar el where, pero de 
+                    // momento asi va, aunque lento.
+                }                
+            }
+            if (where != null) {
+                final Iterable baseSelection = features;
+                final DefaultFeatureExpressionEvaluator evaluator = new DefaultFeatureExpressionEvaluator(where.toString());
+                evaluator.toSymbolTable().addSymbolTable(interpreter.getSymbolTable());
+                final Predicate filter = (Predicate) (Object t) -> {
+                    try {
+                        return (boolean) evaluator.evaluate((EvaluatorData) t);
+                    } catch (EvaluatorException ex1) {
+                        throw new ExpressionRuntimeException("Can't evaluate expression for row.", ex1);
+                    }
+                };
+                features = (Iterable) () -> new FilteredIterator(baseSelection.iterator(), filter);
+            }
+            if( limit!=null ) {
+                final Iterable baseSelection = features;
+                features = (Iterable) () -> new LimitIterator(baseSelection.iterator(), limit.longValue());
+            }
+            return features;
+
+        } catch (ExpressionRuntimeException ex) {
+            throw ex;
+        } catch (Exception ex) {
+            throw new ExpressionRuntimeException("Problems calling '" + this.name() + "' function", ex);
+        }
+    }
+
+    @Override
+    public Code optimize(Optimizer optimizer, Callable caller) {
+        return caller; // Don't optimize SELECT
+    }
+
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/dataaccess/SelectFunction.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/dataaccess/SelectFunction.java	(revision 46099)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/dataaccess/SelectFunction.java	(revision 46100)
@@ -23,31 +23,16 @@
  */
 package org.gvsig.expressionevaluator.impl.function.dataaccess;
 
-import java.util.ArrayList;
-import java.util.HashSet;
 import java.util.List;
-import java.util.Objects;
-import java.util.Set;
 import org.apache.commons.lang3.Range;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.lang3.tuple.ImmutablePair;
-import org.apache.commons.lang3.tuple.Pair;
 import org.gvsig.expressionevaluator.Code;
-import org.gvsig.expressionevaluator.CodeBuilder;
 import org.gvsig.expressionevaluator.Codes;
-import static org.gvsig.expressionevaluator.ExpressionBuilder.FUNCTION_GETATTR;
-import static org.gvsig.expressionevaluator.ExpressionBuilder.FUNCTION_TUPLE;
 import org.gvsig.expressionevaluator.ExpressionRuntimeException;
-import org.gvsig.expressionevaluator.ExpressionUtils;
 import org.gvsig.expressionevaluator.Interpreter;
 import org.gvsig.expressionevaluator.Optimizer;
-import org.gvsig.expressionevaluator.SymbolTable;
 import org.gvsig.expressionevaluator.impl.DALFunctions;
 import static org.gvsig.fmap.dal.DataManager.FUNCTION_SELECT;
-import org.gvsig.fmap.dal.DataStore;
 import org.gvsig.expressionevaluator.ExpressionEvaluator;
-import static org.gvsig.fmap.dal.expressionevaluator.FeatureSymbolTable.SYMBOL_CURRENT_TABLE;
-import org.gvsig.fmap.dal.expressionevaluator.TableAttributeHandler;
 import org.gvsig.fmap.dal.feature.Feature;
 import org.gvsig.fmap.dal.feature.FeatureQuery;
 import org.gvsig.fmap.dal.feature.FeatureQueryOrder;
@@ -136,7 +121,7 @@
                 queryOrder.add(member, mode);
             }
         }
-        FeatureStore featureStore = null;
+        FeatureStore featureStore;
         try {
             featureStore = this.getFeatureStore(storeName);
             if (featureStore == null) {
@@ -165,7 +150,7 @@
         } catch (ExpressionRuntimeException ex) {
             throw ex;
         } catch (Exception ex) {
-            throw new ExpressionRuntimeException("Problems calling '" + FUNCTION_SELECT + "' function", ex);
+            throw new ExpressionRuntimeException("Problems calling '" + this.name() + "' function", ex);
         }
     }
 
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/dataaccess/SelectCountFromSelectionFunction.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/dataaccess/SelectCountFromSelectionFunction.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/dataaccess/SelectCountFromSelectionFunction.java	(revision 46100)
@@ -0,0 +1,134 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2020 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+package org.gvsig.expressionevaluator.impl.function.dataaccess;
+
+import java.util.function.Predicate;
+import org.apache.commons.lang3.Range;
+import org.gvsig.expressionevaluator.Code;
+import org.gvsig.expressionevaluator.Codes;
+import org.gvsig.expressionevaluator.ExpressionRuntimeException;
+import org.gvsig.expressionevaluator.Interpreter;
+import org.gvsig.expressionevaluator.impl.DALFunctions;
+import static org.gvsig.fmap.dal.DataManager.FUNCTION_SELECT_COUNT_FROM_SELECTION;
+import org.gvsig.fmap.dal.feature.FeatureSet;
+import org.gvsig.fmap.dal.feature.FeatureStore;
+import org.gvsig.fmap.dal.impl.expressionevaluator.DefaultFeatureExpressionEvaluator;
+import org.gvsig.tools.evaluator.EvaluatorData;
+import org.gvsig.tools.evaluator.EvaluatorException;
+import org.gvsig.tools.util.ContainerUtils;
+import org.gvsig.tools.util.FilteredIterator;
+
+/**
+ *
+ * @author jjdelcerro
+ */
+@SuppressWarnings("UseSpecificCatch")
+public class SelectCountFromSelectionFunction extends AbstractSelectFunction {
+
+    public SelectCountFromSelectionFunction() {
+        super(DALFunctions.GROUP_DATA_ACCESS,
+                FUNCTION_SELECT_COUNT_FROM_SELECTION,
+                Range.is(3),
+                "Returns the number of features of the table by applying the filter indicated.\n"
+                + "The syntax is:\n\n"
+                + "SELECT COUNT(*) FROM SELECTION [IF NOT EMPTY] OF table WHERE boolean_expression;\n\n"
+                + "Indicate a filter expression with WHERE is optional.\n"
+                + "The SELECT statement must always end with a semicolon.",
+                "SELECT COUNT(*) FROM {{table}} WHERE filter ;",
+                new String[]{
+                    "table - Name of the table",
+                    "filter - boolean expression with the filter to apply",},
+                "Long",
+                false
+        );
+    }
+
+    @Override
+    public boolean isHidden() {
+        return false;
+    }
+
+    @Override
+    public boolean allowConstantFolding() {
+        return false;
+    }
+
+    @Override
+    public boolean useArgumentsInsteadObjects() {
+        return true;
+    }
+
+    @Override
+    public Object call(Interpreter interpreter, Object[] args) throws Exception {
+        throw new UnsupportedOperationException();
+    }
+
+    private static final int TABLE = 0;
+    private static final int WHERE = 1;
+    private static final int SELECCTION_IF_NOT_EMPTY = 2;
+
+    @Override
+    public Object call(Interpreter interpreter, Codes args) throws Exception {
+
+        String storeName = this.getTableName(args, TABLE);
+        Code where = this.getWhereCode(args, WHERE);
+        Object selection_if_not_empty = getObject(interpreter, args, SELECCTION_IF_NOT_EMPTY);
+        
+        FeatureStore featureStore;
+        try {
+            featureStore = this.getFeatureStore(storeName);
+            if (featureStore == null) {
+                throw new ExpressionRuntimeException("Cant locate the feature store '" + storeName + "' in function '" + this.name() + "'.");
+            }
+            Iterable features = featureStore.getFeatureSelection();
+            if( ((FeatureSet)features).isEmpty() ) {
+                if( selection_if_not_empty != null ) {
+                    features = featureStore.getFeatureSet();
+                    // En este caso habria que optimizar el where, pero de 
+                    // momento asi va, aunque lento.
+                }                
+            }
+            if (where != null) {
+                final Iterable baseSelection = features;
+                final DefaultFeatureExpressionEvaluator evaluator = new DefaultFeatureExpressionEvaluator(where.toString());
+                evaluator.toSymbolTable().addSymbolTable(interpreter.getSymbolTable());
+                final Predicate filter = (Predicate) (Object t) -> {
+                    try {
+                        return (boolean) evaluator.evaluate((EvaluatorData) t);
+                    } catch (EvaluatorException ex1) {
+                        throw new ExpressionRuntimeException("Can't evaluate expression for row.", ex1);
+                    }
+                };
+                features = (Iterable) () -> new FilteredIterator(baseSelection.iterator(), filter);
+            }
+            return ContainerUtils.size64(features);
+
+        } catch (ExpressionRuntimeException ex) {
+            throw ex;
+        } catch (Exception ex) {
+            throw new ExpressionRuntimeException("Problems calling '" + this.name() + "' function", ex);
+        }
+    }
+
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/expressionevaluator/impl/grammars/DataAccessGrammarFactory.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/expressionevaluator/impl/grammars/DataAccessGrammarFactory.java	(revision 46099)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/expressionevaluator/impl/grammars/DataAccessGrammarFactory.java	(revision 46100)
@@ -46,6 +46,8 @@
 import org.gvsig.fmap.dal.DataManager;
 import static org.gvsig.fmap.dal.DataManager.FUNCTION_CREATE_TABLE;
 import static org.gvsig.fmap.dal.DataManager.FUNCTION_CREATE_TABLE_STRUCTURE;
+import static org.gvsig.fmap.dal.DataManager.FUNCTION_SELECT_COUNT_FROM_SELECTION;
+import static org.gvsig.fmap.dal.DataManager.FUNCTION_SELECT_FROM_SELECTION;
 
 /**
  *
@@ -238,6 +240,8 @@
             theGrammar.addStatement(createSelectCountStatement(theGrammar));
             theGrammar.addStatement(createSelectStatement(theGrammar));
 //            theGrammar.addStatement(createUpdateStatement(theGrammar));
+            theGrammar.addStatement(createSelectCountFromSelectionStatement(theGrammar));
+            theGrammar.addStatement(createSelectFromSelectionStatement(theGrammar));
 
             this.grammar = theGrammar;
         }
@@ -368,7 +372,44 @@
         return stmt;
     }
 
+    private Statement createSelectFromSelectionStatement(Grammar theGrammar) {
+        Statement stmt;
+//
+//      SELECT * | (column1, column2,...) 
+//          FROM SELECTION OF table_name
+//          WHERE expression
+//        
+        ExpressionEvaluatorManager manager = ExpressionEvaluatorLocator.getManager();
+        CodeBuilder codeBuilder = manager.createCodeBuilder();
 
+        stmt = theGrammar.createStatement("SELECTFROMSELECTION");
+        stmt.addRule(stmt.require_any_token("SELECT"));
+        stmt.addRule(stmt.optional_any_token("*")
+                .addRuleOnTrue(stmt.set_expression("COLUMNS", codeBuilder.tuple()))
+                .addRuleOnFalse(stmt.require_identifiers(",").capture_as("COLUMNS"))
+        );
+        stmt.addRule(stmt.require_any_token("FROM"));
+        stmt.addRule(stmt.require_any_token("SELECTION"));
+        stmt.addRule(stmt.optional_any_token("IF")
+                .addRuleOnTrue(stmt.require_tokens("NOT", "EMPTY").capture_as("IF_NOT_EMPTY"))
+        );
+        stmt.addRule(stmt.optional_any_token("OF"));
+        stmt.addRule(stmt.require_expression().capture_as("TABLE"));
+        stmt.addRule(stmt.optional_any_token("WHERE")
+                .addRuleOnTrue(stmt.require_expression().capture_as("WHERE"))
+        );
+        stmt.addRule(stmt.optional_any_token("LIMIT")
+                .addRuleOnTrue(stmt.require_expression().capture_as("LIMIT"))
+        );
+        stmt.addRule(stmt.optional_any_token(";"));
+        stmt.code(
+                FUNCTION_SELECT_FROM_SELECTION,
+                stmt.args_names("COLUMNS", "TABLE", "WHERE", "LIMIT","IF_NOT_EMPTY")
+        );
+
+        return stmt;
+    }
+
     private Statement createInsertIntoTableSelectStatement(Grammar theGrammar) {
         Statement stmt;
 //
@@ -461,6 +502,35 @@
         return stmt;
     }
 
+    private Statement createSelectCountFromSelectionStatement(Grammar theGrammar) {
+        Statement stmt;
+//
+//      SELECT COUNT(*) FROM SELECTION IF NOT IS EMPTY OF table_name WHERE expression
+//        
+        stmt = theGrammar.createStatement("SELECT_COUNT_FROM_SELECTION");
+        stmt.addRule(stmt.require_any_token("SELECT"));
+        stmt.addRule(stmt.require_any_token("COUNT"));
+        stmt.addRule(stmt.require_any_token("("));
+        stmt.addRule(stmt.require_any_token("*"));
+        stmt.addRule(stmt.require_any_token(")"));
+        stmt.addRule(stmt.require_any_token("FROM"));
+        stmt.addRule(stmt.require_any_token("SELECTION"));
+        stmt.addRule(stmt.optional_any_token("IF")
+                .addRuleOnTrue(stmt.require_tokens("NOT", "EMPTY").capture_as("IF_NOT_EMPTY"))
+        );
+        stmt.addRule(stmt.require_any_token("OF"));
+        stmt.addRule(stmt.require_expression().capture_as("TABLE"));
+        stmt.addRule(stmt.optional_any_token("WHERE")
+                .addRuleOnTrue(stmt.require_expression().capture_as("WHERE"))
+        );
+        stmt.addRule(stmt.require_any_token(";"));
+        stmt.code(
+                FUNCTION_SELECT_COUNT_FROM_SELECTION,
+                stmt.args_names("TABLE", "WHERE", "IF_NOT_EMPTY")
+        );
+        return stmt;
+    }
+
     private Statement createCreateTableStatement(Grammar theGrammar) {
         Statement stmt;
 //
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/expressionevaluator/impl/symboltable/DALSymbolTable.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/expressionevaluator/impl/symboltable/DALSymbolTable.java	(revision 46099)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/expressionevaluator/impl/symboltable/DALSymbolTable.java	(revision 46100)
@@ -36,7 +36,9 @@
 import org.gvsig.expressionevaluator.impl.function.dataaccess.InsertIntoTableFunction;
 import org.gvsig.expressionevaluator.impl.function.dataaccess.IsSelectedCurrentRowFunction;
 import org.gvsig.expressionevaluator.impl.function.dataaccess.RowTagFunction;
+import org.gvsig.expressionevaluator.impl.function.dataaccess.SelectCountFromSelectionFunction;
 import org.gvsig.expressionevaluator.impl.function.dataaccess.SelectCountFunction;
+import org.gvsig.expressionevaluator.impl.function.dataaccess.SelectFromSelectionFunction;
 import org.gvsig.expressionevaluator.impl.function.dataaccess.SelectFunction;
 import org.gvsig.expressionevaluator.impl.function.dataaccess.SetRowTagFunction;
 import org.gvsig.expressionevaluator.spi.AbstractSymbolTable;
@@ -71,5 +73,7 @@
         this.addFunction(new SetRowTagFunction());
         this.addFunction(new CreateTableFunction());
         this.addFunction(new CreateTableStructureFunction());
-    }    
+        this.addFunction(new SelectFromSelectionFunction());
+        this.addFunction(new SelectCountFromSelectionFunction());
+    }     
 }
