Re: ACFinder テスト中

このトピックの投稿一覧へ

なし Re: ACFinder テスト中

msg# 1.7.2.1
depth:
3
前の投稿 - 次の投稿 | 親投稿 - 子投稿なし | 投稿日時 2011.01.09 14:38
OhYeah!  管理人   投稿数: 983 オンライン
引用:これだけ文字コードがなぜか UTF-8になせいか、テーブル作成時にSQLエラーが出てしまいます。ありゃ? C&P で SQL タブに貼り付けて実行してたので、気づかなかった。現在は、文字コードを修正してあります。
あと、m_kihon への koka 書き戻しですが、下記のようにしておかないと、新しい有効成分の剤の効果が「展着」になってしまいます。
--/d
-- テンポラリ効果テーブル
drop table if exists t_koka;
create temp table t_koka as select
  bango, shurui,
  (select kokaid from spec.bunrui where seibun1 = seibun) as koka1,
  (select kokaid from spec.bunrui where seibun2 = seibun) as koka2,
  (select kokaid from spec.bunrui where seibun3 = seibun) as koka3,
  (select kokaid from spec.bunrui where seibun4 = seibun) as koka4,
  (select kokaid from spec.bunrui where seibun5 = seibun) as koka5
from m_kihon;
alter table t_koka add column idkoka integer;
alter table t_koka add column koka varchar;
update t_koka set idkoka = ifnull(koka1, 0) | ifnull(koka2, 0) | ifnull(koka3, 0) | ifnull(koka4, 0) | ifnull(koka5, 0);
update t_koka set idkoka = (select kokaid from spec.koka where koka = '展着') where idkoka = 0 and shurui like '%展着剤';
update t_koka set koka = concat('・',
  (select koka from spec.koka where kokaid = idkoka & 3),
  (select koka from spec.koka where kokaid = idkoka & 4),
  (select koka from spec.koka where kokaid = idkoka & 8),
  (select koka from spec.koka where kokaid = idkoka & 16),
  (select koka from spec.koka where kokaid = idkoka & 32),
  (select koka from spec.koka where kokaid = idkoka & 64),
  (select koka from spec.koka where kokaid = idkoka & 128),
  (select koka from spec.koka where kokaid = idkoka & 256),
  (select koka from spec.koka where kokaid = idkoka & 512),
  (select koka from spec.koka where kokaid = idkoka & 1024),
  (select koka from spec.koka where kokaid = idkoka & 2048),
  (select koka from spec.koka where kokaid = idkoka & 4096),
  (select koka from spec.koka where kokaid = idkoka & 8192),
  (select koka from spec.koka where kokaid = idkoka & 16384),
  (select koka from spec.koka where kokaid = idkoka & 32768)
);
-- m_kihon 更新
update m_kihon set koka = (select koka from t_koka where bango = m_kihon.bango);
drop table if exists t_koka;
投票数:0 平均点:0.00

投稿ツリー

  条件検索へ