|
|
@@ -128,17 +128,17 @@ func (this *TableHeaderController) Getlocations() {
|
|
|
var dbName = utils.Cfg.MustValue("db", "name")
|
|
|
var sql string = ""
|
|
|
if val == "01" {
|
|
|
- sql = "select column_name from information_schema.COLUMNS where table_name='" + OilGoodsAptitudeName + "'" +
|
|
|
- "and TABLE_SCHEMA='" + dbName + "'and column_name like 'F%'" +
|
|
|
- "and column_name not in (select code from " + BaseTableHeader + " where categorycode='" + val + "')"
|
|
|
+ sql = "select COLUMN_NAME as column_name from information_schema.COLUMNS where TABLE_NAME='" + OilGoodsAptitudeName + "'" +
|
|
|
+ "and TABLE_SCHEMA='" + dbName + "'and COLUMN_NAME like 'F%'" +
|
|
|
+ "and COLUMN_NAME not in (select Code from " + BaseTableHeader + " where CategoryCode='" + val + "')"
|
|
|
} else if val == "02" {
|
|
|
- sql = "select column_name from information_schema.COLUMNS where table_name='" + OilBasisBuildName + "'" +
|
|
|
- "and TABLE_SCHEMA='" + dbName + "'and column_name like 'F%'" +
|
|
|
- "and column_name not in (select code from " + BaseTableHeader + " where categorycode='" + val + "')"
|
|
|
+ sql = "select COLUMN_NAME as column_name from information_schema.COLUMNS where TABLE_NAME='" + OilBasisBuildName + "'" +
|
|
|
+ "and TABLE_SCHEMA='" + dbName + "'and COLUMN_NAME like 'F%'" +
|
|
|
+ "and COLUMN_NAME not in (select Code from " + BaseTableHeader + " where CategoryCode='" + val + "')"
|
|
|
} else {
|
|
|
- sql = "select column_name from information_schema.COLUMNS where table_name='" + OilTechnologyServiceName + "'" +
|
|
|
- "and TABLE_SCHEMA='" + dbName + "'and column_name like 'F%'" +
|
|
|
- "and column_name not in (select code from " + BaseTableHeader + " where categorycode='" + val + "')"
|
|
|
+ sql = "select COLUMN_NAME as column_name from information_schema.COLUMNS where TABLE_NAME='" + OilTechnologyServiceName + "'" +
|
|
|
+ "and TABLE_SCHEMA='" + dbName + "'and COLUMN_NAME like 'F%'" +
|
|
|
+ "and COLUMN_NAME not in (select Code from " + BaseTableHeader + " where CategoryCode='" + val + "')"
|
|
|
}
|
|
|
|
|
|
results, _ = svc.DBE.QueryString(sql)
|