Examples of composeSQL()


Examples of com.knowgate.hipergate.QueryByForm.composeSQL()

    sSQL = "INSERT INTO " + DB.k_job_atoms +
           " (gu_job,id_status," + sColumns + ") " +
           " (SELECT '" + sJobGUID + "'," + String.valueOf(iInitialStatus) +
           "," + sColumns + " FROM " + DB.k_member_address + " ma WHERE ma.gu_workarea='" + sWorkAreaGUID +
           "' AND (" + oQBF.composeSQL() + ") AND NOT EXISTS (SELECT x." + DB.tx_email +
           " FROM " + DB.k_lists + " b, " + DB.k_x_list_members + " x WHERE b." +
           DB.gu_list + "=x." + DB.gu_list + " AND b." + DB.gu_query + "='" + sListGUID +
           "' AND b." + DB.tp_list + "=" + String.valueOf(DistributionList.TYPE_BLACK) +
           " AND x." + DB.tx_email + "=ma." + DB.tx_email + ") AND NOT EXISTS (SELECT j." + DB.tx_email +
           " FROM " + DB.k_job_atoms + " j WHERE j." + DB.gu_job + "='" + sJobGUID + "' AND " +
View Full Code Here

Examples of com.knowgate.hipergate.QueryByForm.composeSQL()

      sTableName = DB.k_member_address;

      QueryByForm oQBF = new QueryByForm(oConn, DB.k_member_address, "m", getString(DB.gu_query));

      sWhere = "m." + DB.gu_workarea + "='" + getString(DB.gu_workarea) + "' AND ";
      sWhere+= "(" + oQBF.composeSQL() + ") AND ";
      sWhere+= " NOT EXISTS (SELECT " + DB.tx_email + " FROM " + DB.k_x_list_members + " b WHERE b." + DB.gu_list + "='" + sBlackList + "' AND b." + DB.tx_email + "=m." + DB.tx_email + ")";

      oQBF = null;
    }
    else {
View Full Code Here

Examples of com.knowgate.hipergate.QueryByForm.composeSQL()

      sTableName = DB.k_member_address;

      QueryByForm oQBF = new QueryByForm(oConn, DB.k_member_address, "m", getString(DB.gu_query));

      sWhere = "m." + DB.gu_workarea + "='" + getString(DB.gu_workarea) + "' AND ";
      sWhere+= "(" + oQBF.composeSQL() + ") AND ";
      sWhere+= " NOT EXISTS (SELECT " + DB.tx_email + " FROM " + DB.k_x_list_members + " b WHERE b." + DB.gu_list + "='" + sBlackList + "' AND b." + DB.tx_email + "=m." + DB.tx_email + ")";

      oQBF = null;
    }
    else {
View Full Code Here

Examples of com.knowgate.hipergate.QueryByForm.composeSQL()

      sTableName = DB.k_member_address;

      QueryByForm oQBF = new QueryByForm(oConn, DB.k_member_address, "m", getString(DB.gu_query));

      sWhere = "m." + DB.gu_workarea + "='" + getString(DB.gu_workarea) + "' AND ";
      sWhere+= "(" + oQBF.composeSQL() + ") AND " + DB.gu_contact + " IS NOT NULL AND ";
      sWhere+= " NOT EXISTS (SELECT " + DB.tx_email + " FROM " + DB.k_x_list_members + " b WHERE b." + DB.gu_list + "='" + sBlackList + "' AND b." + DB.tx_email + "=m." + DB.tx_email + ")";

      oQBF = null;
    }
    else if (getShort(DB.tp_list)!=TYPE_DIRECT) {
View Full Code Here

Examples of com.knowgate.hipergate.QueryByForm.composeSQL()

      sTableName = DB.k_member_address;

      QueryByForm oQBF = new QueryByForm(oConn, DB.k_member_address, "m", getString(DB.gu_query));

      sWhere = "m." + DB.gu_workarea + "='" + getString(DB.gu_workarea) + "' AND ";
      sWhere+= "(" + oQBF.composeSQL() + ") AND " + DB.gu_company + " IS NOT NULL AND ";
      sWhere+= " NOT EXISTS (SELECT " + DB.tx_email + " FROM " + DB.k_x_list_members + " b WHERE b." + DB.gu_list + "='" + sBlackList + "' AND b." + DB.tx_email + "=m." + DB.tx_email + ")";

      oQBF = null;
    }
    else {
View Full Code Here

Examples of com.knowgate.hipergate.QueryByForm.composeSQL()

      case TYPE_DYNAMIC:
        oQBF = new QueryByForm(oConn, DB.k_member_address, "ma", getString (DB.gu_query));

        if (DebugFile.trace)
          DebugFile.writeln("Connection.prepareStatement(SELECT NULL FROM " + DB.k_member_address + " ma WHERE ma." + DB.gu_workarea + "=? AND (ma." + DB.gu_contact + "='" + sMember + "' OR ma." + DB.gu_company + "='" + sMember + "') AND (" + oQBF.composeSQL() + "))");

        oStmt = oConn.prepareStatement("SELECT NULL FROM " + DB.k_member_address + " ma WHERE ma." + DB.gu_workarea + "=? AND (ma." + DB.gu_contact + "=? OR ma." + DB.gu_company + "=?) AND (" + oQBF.composeSQL() + ")", ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);

        oStmt.setString(1, getString(DB.gu_workarea));
        oStmt.setString(2, sMember);
View Full Code Here

Examples of com.knowgate.hipergate.QueryByForm.composeSQL()

        oQBF = new QueryByForm(oConn, DB.k_member_address, "ma", getString (DB.gu_query));

        if (DebugFile.trace)
          DebugFile.writeln("Connection.prepareStatement(SELECT NULL FROM " + DB.k_member_address + " ma WHERE ma." + DB.gu_workarea + "=? AND (ma." + DB.gu_contact + "='" + sMember + "' OR ma." + DB.gu_company + "='" + sMember + "') AND (" + oQBF.composeSQL() + "))");

        oStmt = oConn.prepareStatement("SELECT NULL FROM " + DB.k_member_address + " ma WHERE ma." + DB.gu_workarea + "=? AND (ma." + DB.gu_contact + "=? OR ma." + DB.gu_company + "=?) AND (" + oQBF.composeSQL() + ")", ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);

        oStmt.setString(1, getString(DB.gu_workarea));
        oStmt.setString(2, sMember);
        oStmt.setString(3, sMember);
        oRSet = oStmt.executeQuery();
View Full Code Here

Examples of com.knowgate.hipergate.QueryByForm.composeSQL()

      // Componer la sentencia SQL de filtrado de datos a partir de la definición de la consulta almacenada en la tabla k_queries
      QueryByForm oQBF = new QueryByForm(oConn, DB.k_member_address, "ma", oAppendedList.getString(DB.gu_query));
      sColumnList = DB.mov_phone + "," + DB.tx_email + "," + DB.tx_name + "," + DB.tx_surname + "," + DB.tx_salutation + "," + DB.gu_company + "," + DB.gu_contact;

      sSQL = "INSERT INTO " + DB.k_x_list_members + " ("+DB.gu_list+"," + sColumnList + ") " +
             "SELECT '" + getString(DB.gu_list) + "'," + sColumnList + " FROM " + DB.k_member_address  + " ma WHERE ma.gu_workarea='" + oAppendedList.getString(DB.gu_workarea) + "' AND (" + oQBF.composeSQL() + ") AND " +
             "ma." + DB.tx_email + " NOT IN (SELECT " + DB.tx_email + " FROM " + DB.k_x_list_members + " WHERE " + DB.gu_list + "='" + getString(DB.gu_list) + "')";
    }

    else {
View Full Code Here

Examples of com.knowgate.hipergate.QueryByForm.composeSQL()

    try { if (oConn.getDataBaseProduct()!=JDCConnection.DBMS_POSTGRESQL) oInsrt.setQueryTimeout(60); catch (SQLException sqle) { /* ignore */}

    if (oAppendedList.getShort(DB.tp_list)==TYPE_DYNAMIC) {
      QueryByForm oQBF = new QueryByForm(oConn, DB.k_member_address, "b", oAppendedList.getString(DB.gu_query));

      sSQL = "SELECT b." + DB.tx_name + ",b." + DB.tx_surname + ",b." + DB.tx_salutation + ",1,b." + DB.gu_company + ",b." + DB.gu_contact + ",'TXT', a." + DB.tx_email + " FROM " + DB.k_x_list_members + " a, " + DB.k_member_address + " b WHERE a." + DB.gu_list + "='" + getString(DB.gu_list) + "' AND b." + DB.gu_workarea + "='" + oAppendedList.getString(DB.gu_workarea) + "' AND (" + oQBF.composeSQL() + ") AND a." + DB.tx_email + "=b." + DB.tx_email;
    }
    else
      sSQL = "SELECT b." + DB.tx_name + ",b." + DB.tx_surname + ",b." + DB.tx_salutation + ",b." + DB.bo_active + ",b." + DB.gu_company + ",b." + DB.gu_contact + ",b." + DB.id_format + ", a." + DB.tx_email + " FROM " + DB.k_x_list_members + " a, " + DB.k_x_list_members + " b WHERE a." + DB.gu_list + "='" + getString(DB.gu_list) + "' AND b." + DB.gu_list + "='" + sListGUID + "' AND a." + DB.tx_email + "=b." + DB.tx_email;

    if (DebugFile.trace) DebugFile.writeln("Statement.executeQuery(" + sSQL + ")");
View Full Code Here

Examples of com.knowgate.hipergate.QueryByForm.composeSQL()

    else if (oAppendedList.getShort(DB.tp_list)==TYPE_DYNAMIC) {

      QueryByForm oQBF = new QueryByForm(oConn, DB.k_member_address, "ma", oAppendedList.getString(DB.gu_query));

      sSQL = "DELETE FROM " + DB.k_x_list_members + " WHERE " + DB.gu_list + "='" + getString(DB.gu_list) + "' AND " + DB.tx_email + " IN (SELECT " + DB.tx_email + " FROM " + DB.k_member_address + " ma WHERE ma." + DB.gu_workarea + "='" + oAppendedList.getString(DB.gu_workarea) + "' AND (" + oQBF.composeSQL() + "))";
    }

    else

      sSQL = "DELETE FROM " + DB.k_x_list_members + " WHERE " + DB.gu_list + "='" + getString(DB.gu_list) + "' AND " + DB.tx_email + " IN (SELECT " + DB.tx_email + " FROM " + DB.k_x_list_members + " WHERE " + DB.gu_list + "='" + sListGUID + "')";
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.