# update[1]/record/heap
Begin;
Initialize;
# テスト用のDBを作る
InitializeSession "";
Command "create database TESTDB";
TerminateSession;

InitializeSession "TESTDB";
Command  "create table #1(C1 nvarchar(32) hint heap)";
Command  "select C1 from #1";
# SQLコマンドupdateをテストする
# update対象のタプルをまずinsert
Command  "insert into #1 (C1) values (?)" ["ほげ"];
# 自分自身にupdate
Command  "update #1 set C1=?" ["ほげ"];
# 別の内容にupdate
Command  "update #1 set C1=?" ["ホゲ"];
# updateされない(はずの)タプルをinsert
Command  "insert into #1 (C1) values (?)" ["ピヨ"];
# 存在しないタプルをwhere句で指定
Command  "update #1 set C1=? where C1=?" ["ホゲ", "ほげ"];
# 存在するタプルをwhere句で指定。片方のみ更新される
Command  "update #1 set C1=? where C1=?" ["ぴよ", "ホゲ"];
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 nvarchar(32) array [no limit] hint heap)";
Command  "select C1 from #1";
# SQLコマンドupdateをテストする
# update対象のタプルをまずinsert
Command  "insert into #1 (C1) values (?)" [["ほげ", "ホゲ"]];
# 自分自身にupdate
Command  "update #1 set C1=?" [["ほげ", "ホゲ"]];
# 別の内容にupdate
Command  "update #1 set C1=?" [["ホゲ", "ほげ"]];
# updateされない(はずの)タプルをinsert
Command  "insert into #1 (C1) values (?)" [["ぴよ", "ほげ"]];
# 存在しないタプルをwhere句で指定
Command  "update #1 set C1=? where C1=?" [["ホゲ", "ほげ"], ["ほげ", "ホゲ"]];
# 存在するタプルをwhere句で指定。片方のみ更新される
Command  "update #1 set C1=? where C1=?" [["ほげ", "ぴよ"], ["ホゲ", "ほげ"]];
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 ntext hint heap)";
Command  "select C1 from #1";
# SQLコマンドupdateをテストする
# update対象のタプルをまずinsert
Command  "insert into #1 (C1) values (?)" [textsjisfile "..\\..\\doc\\hello.txt"];
# 自分自身にupdate
Command  "update #1 set C1=?" [textsjisfile "..\\..\\doc\\hello.txt"];
# 別の内容にupdate
Command  "update #1 set C1=?" [textsjisfile "..\\..\\doc\\ricoh.txt"];
# updateされない(はずの)タプルをinsert
Command  "insert into #1 (C1) values (?)" [textsjisfile "..\\..\\doc\\takekurabe.txt"];
# 存在しないタプルをwhere句で指定
Command  "update #1 set C1=? where C1=?" [textsjisfile "..\\..\\doc\\ricoh.txt", textsjisfile "..\\..\\doc\\hello.txt"];
# 存在するタプルをwhere句で指定。片方のみ更新される
Command  "update #1 set C1=? where C1=?" [textsjisfile "..\\..\\doc\\Teihon.txt", textsjisfile "..\\..\\doc\\ricoh.txt"];
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 ntext array [no limit] hint heap)";
Command  "select C1 from #1";
# SQLコマンドupdateをテストする
# update対象のタプルをまずinsert
Command  "insert into #1 (C1) values (?)" [[textsjisfile "..\\..\\doc\\hello.txt", textsjisfile "..\\..\\doc\\ricoh.txt"]];
# 自分自身にupdate
Command  "update #1 set C1=?" [[textsjisfile "..\\..\\doc\\hello.txt", textsjisfile "..\\..\\doc\\ricoh.txt"]];
# 別の内容にupdate
Command  "update #1 set C1=?" [[textsjisfile "..\\..\\doc\\ricoh.txt", textsjisfile "..\\..\\doc\\hello.txt"]];
# updateされない(はずの)タプルをinsert
Command  "insert into #1 (C1) values (?)" [[textsjisfile "..\\..\\doc\\Teihon.txt", textsjisfile "..\\..\\doc\\hello.txt"]];
# 存在しないタプルをwhere句で指定
Command  "update #1 set C1=? where C1=?" [[textsjisfile "..\\..\\doc\\ricoh.txt", textsjisfile "..\\..\\doc\\hello.txt"], [textsjisfile "..\\..\\doc\\hello.txt", textsjisfile "..\\..\\doc\\ricoh.txt"]];
# 存在するタプルをwhere句で指定。片方のみ更新される
Command  "update #1 set C1=? where C1=?" [[textsjisfile "..\\..\\doc\\hello.txt", textsjisfile "..\\..\\doc\\Teihon.txt"], [textsjisfile "..\\..\\doc\\ricoh.txt", textsjisfile "..\\..\\doc\\hello.txt"]];
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 fulltext hint heap)";
Command  "select C1 from #1";
# SQLコマンドupdateをテストする
# update対象のタプルをまずinsert
Command  "insert into #1 (C1) values (?)" [textsjisfile "..\\..\\doc\\kenpou.txt"];
# 自分自身にupdate
Command  "update #1 set C1=?" [textsjisfile "..\\..\\doc\\kenpou.txt"];
# 別の内容にupdate
Command  "update #1 set C1=?" [textsjisfile "..\\..\\doc\\rasyoumon.txt"];
# updateされない(はずの)タプルをinsert
Command  "insert into #1 (C1) values (?)" [textsjisfile "..\\..\\doc\\RainyNight.txt"];
# 存在しないタプルをwhere句で指定
Command  "update #1 set C1=? where C1=?" [textsjisfile "..\\..\\doc\\rasyoumon.txt", textsjisfile "..\\..\\doc\\kenpou.txt"];
# 存在するタプルをwhere句で指定。片方のみ更新される
Command  "update #1 set C1=? where C1=?" [textsjisfile "..\\..\\doc\\KINGARTHURS_ROUNDTABLE.txt", textsjisfile "..\\..\\doc\\rasyoumon.txt"];
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 fulltext array [no limit] hint heap)";
Command  "select C1 from #1";
# SQLコマンドupdateをテストする
# update対象のタプルをまずinsert
Command  "insert into #1 (C1) values (?)" [[textsjisfile "..\\..\\doc\\kenpou.txt", textsjisfile "..\\..\\doc\\rasyoumon.txt"]];
# 自分自身にupdate
Command  "update #1 set C1=?" [[textsjisfile "..\\..\\doc\\kenpou.txt", textsjisfile "..\\..\\doc\\rasyoumon.txt"]];
# 別の内容にupdate
Command  "update #1 set C1=?" [[textsjisfile "..\\..\\doc\\rasyoumon.txt", textsjisfile "..\\..\\doc\\kenpou.txt"]];
# updateされない(はずの)タプルをinsert
Command  "insert into #1 (C1) values (?)" [[textsjisfile "..\\..\\doc\\KINGARTHURS_ROUNDTABLE.txt", textsjisfile "..\\..\\doc\\kenpou.txt"]];
# 存在しないタプルをwhere句で指定
Command  "update #1 set C1=? where C1=?" [[textsjisfile "..\\..\\doc\\rasyoumon.txt", textsjisfile "..\\..\\doc\\kenpou.txt"], [textsjisfile "..\\..\\doc\\kenpou.txt", textsjisfile "..\\..\\doc\\rasyoumon.txt"]];
# 存在するタプルをwhere句で指定。片方のみ更新される
Command  "update #1 set C1=? where C1=?" [[textsjisfile "..\\..\\doc\\kenpou.txt", textsjisfile "..\\..\\doc\\KINGARTHURS_ROUNDTABLE.txt"], [textsjisfile "..\\..\\doc\\rasyoumon.txt", textsjisfile "..\\..\\doc\\kenpou.txt"]];
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 int hint heap)";
Command  "select C1 from #1";
# SQLコマンドupdateをテストする
# update対象のタプルをまずinsert
Command  "insert into #1 (C1) values (?)" [777];
# 自分自身にupdate
Command  "update #1 set C1=?" [777];
# 別の内容にupdate
Command  "update #1 set C1=?" [555];
# updateされない(はずの)タプルをinsert
Command  "insert into #1 (C1) values (?)" [99999999];
# 存在しないタプルをwhere句で指定
Command  "update #1 set C1=? where C1=?" [555, 777];
# 存在するタプルをwhere句で指定。片方のみ更新される
Command  "update #1 set C1=? where C1=?" [333, 555];
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 int array [no limit] hint heap)";
Command  "select C1 from #1";
# SQLコマンドupdateをテストする
# update対象のタプルをまずinsert
Command  "insert into #1 (C1) values (?)" [[777, 555]];
# 自分自身にupdate
Command  "update #1 set C1=?" [[777, 555]];
# 別の内容にupdate
Command  "update #1 set C1=?" [[555, 777]];
# updateされない(はずの)タプルをinsert
Command  "insert into #1 (C1) values (?)" [[333, 777]];
# 存在しないタプルをwhere句で指定
Command  "update #1 set C1=? where C1=?" [[555, 777], [777, 555]];
# 存在するタプルをwhere句で指定。片方のみ更新される
Command  "update #1 set C1=? where C1=?" [[777, 333], [555, 777]];
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 float hint heap)";
Command  "select C1 from #1";
# SQLコマンドupdateをテストする
# update対象のタプルをまずinsert
Command  "insert into #1 (C1) values (?)" [3.141592];
# 自分自身にupdate
Command  "update #1 set C1=?" [3.141592];
# 別の内容にupdate
Command  "update #1 set C1=?" [2.718281];
# updateされない(はずの)タプルをinsert
Command  "insert into #1 (C1) values (?)" [-0.789878];
# 存在しないタプルをwhere句で指定
Command  "update #1 set C1=? where C1=?" [2.718281, 3.141592];
# 存在するタプルをwhere句で指定。片方のみ更新される
Command  "update #1 set C1=? where C1=?" [1.414213, 2.718281];
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 float array [no limit] hint heap)";
Command  "select C1 from #1";
# SQLコマンドupdateをテストする
# update対象のタプルをまずinsert
Command  "insert into #1 (C1) values (?)" [[3.141592, 2.718281]];
# 自分自身にupdate
Command  "update #1 set C1=?" [[3.141592, 2.718281]];
# 別の内容にupdate
Command  "update #1 set C1=?" [[2.718281, 3.141592]];
# updateされない(はずの)タプルをinsert
Command  "insert into #1 (C1) values (?)" [[1.414213, 3.141592]];
# 存在しないタプルをwhere句で指定
Command  "update #1 set C1=? where C1=?" [[2.718281, 3.141592], [3.141592, 2.718281]];
# 存在するタプルをwhere句で指定。片方のみ更新される
Command  "update #1 set C1=? where C1=?" [[3.141592, 1.414213], [2.718281, 3.141592]];
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 datetime hint heap)";
Command  "select C1 from #1";
# SQLコマンドupdateをテストする
# update対象のタプルをまずinsert
Command  "insert into #1 (C1) values (?)" [time "2001-07-07 12:34:56.789"];
# 自分自身にupdate
Command  "update #1 set C1=?" [time "2001-07-07 12:34:56.789"];
# 別の内容にupdate
Command  "update #1 set C1=?" [time "2001-09-09 00:00:00.000"];
# updateされない(はずの)タプルをinsert
Command  "insert into #1 (C1) values (?)" [time "1999-07-21 13:20:00.600"];
# 存在しないタプルをwhere句で指定
Command  "update #1 set C1=? where C1=?" [time "2001-09-09 00:00:00.000", time "2001-07-07 12:34:56.789"];
# 存在するタプルをwhere句で指定。片方のみ更新される
Command  "update #1 set C1=? where C1=?" [time "2002-10-11 17:34:51.000", time "2001-09-09 00:00:00.000"];
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 datetime array [no limit] hint heap)";
Command  "select C1 from #1";
# SQLコマンドupdateをテストする
# update対象のタプルをまずinsert
Command  "insert into #1 (C1) values (?)" [[time "2001-07-07 12:34:56.789", time "2001-09-09 00:00:00.000"]];
# 自分自身にupdate
Command  "update #1 set C1=?" [[time "2001-07-07 12:34:56.789", time "2001-09-09 00:00:00.000"]];
# 別の内容にupdate
Command  "update #1 set C1=?" [[time "2001-09-09 00:00:00.000", time "2001-07-07 12:34:56.789"]];
# updateされない(はずの)タプルをinsert
Command  "insert into #1 (C1) values (?)" [[time "2002-10-11 17:34:51.000", time "2001-07-07 12:34:56.789"]];
# 存在しないタプルをwhere句で指定
Command  "update #1 set C1=? where C1=?" [[time "2001-09-09 00:00:00.000", time "2001-07-07 12:34:56.789"], [time "2001-07-07 12:34:56.789", time "2001-09-09 00:00:00.000"]];
# 存在するタプルをwhere句で指定。片方のみ更新される
Command  "update #1 set C1=? where C1=?" [[time "2001-07-07 12:34:56.789", time "2002-10-11 17:34:51.000"], [time "2001-09-09 00:00:00.000", time "2001-07-07 12:34:56.789"]];
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 image hint heap)";
Command  "select C1 from #1";
# SQLコマンドupdateをテストする
# update対象のタプルをまずinsert
Command  "insert into #1 (C1) values (?)" [binaryfile "..\\..\\doc\\rnd10k"];
# 自分自身にupdate
Command  "update #1 set C1=?" [binaryfile "..\\..\\doc\\rnd10k"];
# 別の内容にupdate
Command  "update #1 set C1=?" [binaryfile "..\\..\\doc\\rnd20k"];
# updateされない(はずの)タプルをinsert
Command  "insert into #1 (C1) values (?)" [binaryfile "..\\..\\doc\\rnd100k"];
# 存在しないタプルをwhere句で指定
# 存在するタプルをwhere句で指定。片方のみ更新される
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 image array [no limit] hint heap)";
Command  "select C1 from #1";
# SQLコマンドupdateをテストする
# update対象のタプルをまずinsert
Command  "insert into #1 (C1) values (?)" [[binaryfile "..\\..\\doc\\rnd10k", binaryfile "..\\..\\doc\\rnd20k"]];
# 自分自身にupdate
Command  "update #1 set C1=?" [[binaryfile "..\\..\\doc\\rnd10k", binaryfile "..\\..\\doc\\rnd20k"]];
# 別の内容にupdate
Command  "update #1 set C1=?" [[binaryfile "..\\..\\doc\\rnd20k", binaryfile "..\\..\\doc\\rnd10k"]];
# updateされない(はずの)タプルをinsert
Command  "insert into #1 (C1) values (?)" [[binaryfile "..\\..\\doc\\rnd50k", binaryfile "..\\..\\doc\\rnd10k"]];
# 存在しないタプルをwhere句で指定
Command  "update #1 set C1=? where C1=?" [[binaryfile "..\\..\\doc\\rnd20k", binaryfile "..\\..\\doc\\rnd10k"], [binaryfile "..\\..\\doc\\rnd10k", binaryfile "..\\..\\doc\\rnd20k"]];
# 存在するタプルをwhere句で指定。片方のみ更新される
Command  "update #1 set C1=? where C1=?" [[binaryfile "..\\..\\doc\\rnd10k", binaryfile "..\\..\\doc\\rnd50k"], [binaryfile "..\\..\\doc\\rnd20k", binaryfile "..\\..\\doc\\rnd10k"]];
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 nvarchar(32) hint heap)";
Command  "select C1 from #1";
# SQLコマンドupdateをテストする
# update対象のタプルをまずinsert
Command  "insert into #1 (C1) values (?)" [null];
# 自分自身にupdate
Command  "update #1 set C1=?" [null];
# 別の内容にupdate
Command  "update #1 set C1=?" ["ホゲ"];
# updateされない(はずの)タプルをinsert
Command  "insert into #1 (C1) values (?)" ["ピヨ"];
# 存在しないタプルをwhere句で指定
Command  "update #1 set C1=? where C1 is null" ["ホゲ"];
# 存在するタプルをwhere句で指定。片方のみ更新される
Command  "update #1 set C1=? where C1=?" [null, "ホゲ"];
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 nvarchar(32) array [no limit] hint heap)";
Command  "select C1 from #1";
# SQLコマンドupdateをテストする
# update対象のタプルをまずinsert
Command  "insert into #1 (C1) values (?)" [[null, "ほげ"]];
# 自分自身にupdate
Command  "update #1 set C1=?" [[null, "ほげ"]];
# 別の内容にupdate
Command  "update #1 set C1=?" [["ホゲ", "ほげ"]];
# updateされない(はずの)タプルをinsert
Command  "insert into #1 (C1) values (?)" [["ぴよ", "ほげ"]];
# 存在しないタプルをwhere句で指定
Command  "update #1 set C1=? where C1=?" [["ホゲ", "ほげ"], [null, "ほげ"]];
# 存在するタプルをwhere句で指定。片方のみ更新される
Command  "update #1 set C1=? where C1=?" [[null, "ホゲ"], ["ホゲ", "ほげ"]];
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 ntext hint heap)";
Command  "select C1 from #1";
# SQLコマンドupdateをテストする
# update対象のタプルをまずinsert
Command  "insert into #1 (C1) values (?)" [null];
# 自分自身にupdate
Command  "update #1 set C1=?" [null];
# 別の内容にupdate
Command  "update #1 set C1=?" [textsjisfile "..\\..\\doc\\ricoh.txt"];
# updateされない(はずの)タプルをinsert
Command  "insert into #1 (C1) values (?)" [textsjisfile "..\\..\\doc\\takekurabe.txt"];
# 存在しないタプルをwhere句で指定
Command  "update #1 set C1=? where C1 is null" [textsjisfile "..\\..\\doc\\ricoh.txt"];
# 存在するタプルをwhere句で指定。片方のみ更新される
Command  "update #1 set C1=? where C1=?" [null, textsjisfile "..\\..\\doc\\ricoh.txt"];
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 ntext array [no limit] hint heap)";
Command  "select C1 from #1";
# SQLコマンドupdateをテストする
# update対象のタプルをまずinsert
Command  "insert into #1 (C1) values (?)" [[null, textsjisfile "..\\..\\doc\\hello.txt"]];
# 自分自身にupdate
Command  "update #1 set C1=?" [[null, textsjisfile "..\\..\\doc\\hello.txt"]];
# 別の内容にupdate
Command  "update #1 set C1=?" [[textsjisfile "..\\..\\doc\\ricoh.txt", textsjisfile "..\\..\\doc\\hello.txt"]];
# updateされない(はずの)タプルをinsert
Command  "insert into #1 (C1) values (?)" [[textsjisfile "..\\..\\doc\\Teihon.txt", textsjisfile "..\\..\\doc\\hello.txt"]];
# 存在しないタプルをwhere句で指定
Command  "update #1 set C1=? where C1=?" [[textsjisfile "..\\..\\doc\\ricoh.txt", textsjisfile "..\\..\\doc\\hello.txt"], [null, textsjisfile "..\\..\\doc\\hello.txt"]];
# 存在するタプルをwhere句で指定。片方のみ更新される
Command  "update #1 set C1=? where C1=?" [[null, textsjisfile "..\\..\\doc\\ricoh.txt"], [textsjisfile "..\\..\\doc\\ricoh.txt", textsjisfile "..\\..\\doc\\hello.txt"]];
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 fulltext hint heap)";
Command  "select C1 from #1";
# SQLコマンドupdateをテストする
# update対象のタプルをまずinsert
Command  "insert into #1 (C1) values (?)" [null];
# 自分自身にupdate
Command  "update #1 set C1=?" [null];
# 別の内容にupdate
Command  "update #1 set C1=?" [textsjisfile "..\\..\\doc\\rasyoumon.txt"];
# updateされない(はずの)タプルをinsert
Command  "insert into #1 (C1) values (?)" [textsjisfile "..\\..\\doc\\RainyNight.txt"];
# 存在しないタプルをwhere句で指定
Command  "update #1 set C1=? where C1 is null" [textsjisfile "..\\..\\doc\\rasyoumon.txt"];
# 存在するタプルをwhere句で指定。片方のみ更新される
Command  "update #1 set C1=? where C1=?" [null, textsjisfile "..\\..\\doc\\rasyoumon.txt"];
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 fulltext array [no limit] hint heap)";
Command  "select C1 from #1";
# SQLコマンドupdateをテストする
# update対象のタプルをまずinsert
Command  "insert into #1 (C1) values (?)" [[null, textsjisfile "..\\..\\doc\\kenpou.txt"]];
# 自分自身にupdate
Command  "update #1 set C1=?" [[null, textsjisfile "..\\..\\doc\\kenpou.txt"]];
# 別の内容にupdate
Command  "update #1 set C1=?" [[textsjisfile "..\\..\\doc\\rasyoumon.txt", textsjisfile "..\\..\\doc\\kenpou.txt"]];
# updateされない(はずの)タプルをinsert
Command  "insert into #1 (C1) values (?)" [[textsjisfile "..\\..\\doc\\KINGARTHURS_ROUNDTABLE.txt", textsjisfile "..\\..\\doc\\kenpou.txt"]];
# 存在しないタプルをwhere句で指定
Command  "update #1 set C1=? where C1=?" [[textsjisfile "..\\..\\doc\\rasyoumon.txt", textsjisfile "..\\..\\doc\\kenpou.txt"], [null, textsjisfile "..\\..\\doc\\kenpou.txt"]];
# 存在するタプルをwhere句で指定。片方のみ更新される
Command  "update #1 set C1=? where C1=?" [[null, textsjisfile "..\\..\\doc\\rasyoumon.txt"], [textsjisfile "..\\..\\doc\\rasyoumon.txt", textsjisfile "..\\..\\doc\\kenpou.txt"]];
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 int hint heap)";
Command  "select C1 from #1";
# SQLコマンドupdateをテストする
# update対象のタプルをまずinsert
Command  "insert into #1 (C1) values (?)" [null];
# 自分自身にupdate
Command  "update #1 set C1=?" [null];
# 別の内容にupdate
Command  "update #1 set C1=?" [555];
# updateされない(はずの)タプルをinsert
Command  "insert into #1 (C1) values (?)" [99999999];
# 存在しないタプルをwhere句で指定
Command  "update #1 set C1=? where C1 is null" [555];
# 存在するタプルをwhere句で指定。片方のみ更新される
Command  "update #1 set C1=? where C1=?" [null, 555];
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 int array [no limit] hint heap)";
Command  "select C1 from #1";
# SQLコマンドupdateをテストする
# update対象のタプルをまずinsert
Command  "insert into #1 (C1) values (?)" [[null, 777]];
# 自分自身にupdate
Command  "update #1 set C1=?" [[null, 777]];
# 別の内容にupdate
Command  "update #1 set C1=?" [[555, 777]];
# updateされない(はずの)タプルをinsert
Command  "insert into #1 (C1) values (?)" [[333, 777]];
# 存在しないタプルをwhere句で指定
Command  "update #1 set C1=? where C1=?" [[555, 777], [null, 777]];
# 存在するタプルをwhere句で指定。片方のみ更新される
Command  "update #1 set C1=? where C1=?" [[null, 555], [555, 777]];
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 float hint heap)";
Command  "select C1 from #1";
# SQLコマンドupdateをテストする
# update対象のタプルをまずinsert
Command  "insert into #1 (C1) values (?)" [null];
# 自分自身にupdate
Command  "update #1 set C1=?" [null];
# 別の内容にupdate
Command  "update #1 set C1=?" [2.718281];
# updateされない(はずの)タプルをinsert
Command  "insert into #1 (C1) values (?)" [-0.789878];
# 存在しないタプルをwhere句で指定
Command  "update #1 set C1=? where C1 is null" [2.718281];
# 存在するタプルをwhere句で指定。片方のみ更新される
Command  "update #1 set C1=? where C1=?" [null, 2.718281];
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 float array [no limit] hint heap)";
Command  "select C1 from #1";
# SQLコマンドupdateをテストする
# update対象のタプルをまずinsert
Command  "insert into #1 (C1) values (?)" [[null, 3.141592]];
# 自分自身にupdate
Command  "update #1 set C1=?" [[null, 3.141592]];
# 別の内容にupdate
Command  "update #1 set C1=?" [[2.718281, 3.141592]];
# updateされない(はずの)タプルをinsert
Command  "insert into #1 (C1) values (?)" [[1.414213, 3.141592]];
# 存在しないタプルをwhere句で指定
Command  "update #1 set C1=? where C1=?" [[2.718281, 3.141592], [null, 3.141592]];
# 存在するタプルをwhere句で指定。片方のみ更新される
Command  "update #1 set C1=? where C1=?" [[null, 2.718281], [2.718281, 3.141592]];
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 datetime hint heap)";
Command  "select C1 from #1";
# SQLコマンドupdateをテストする
# update対象のタプルをまずinsert
Command  "insert into #1 (C1) values (?)" [null];
# 自分自身にupdate
Command  "update #1 set C1=?" [null];
# 別の内容にupdate
Command  "update #1 set C1=?" [time "2001-09-09 00:00:00.000"];
# updateされない(はずの)タプルをinsert
Command  "insert into #1 (C1) values (?)" [time "1999-07-21 13:20:00.600"];
# 存在しないタプルをwhere句で指定
Command  "update #1 set C1=? where C1 is null" [time "2001-09-09 00:00:00.000"];
# 存在するタプルをwhere句で指定。片方のみ更新される
Command  "update #1 set C1=? where C1=?" [null, time "2001-09-09 00:00:00.000"];
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 datetime array [no limit] hint heap)";
Command  "select C1 from #1";
# SQLコマンドupdateをテストする
# update対象のタプルをまずinsert
Command  "insert into #1 (C1) values (?)" [[null, time "2001-07-07 12:34:56.789"]];
# 自分自身にupdate
Command  "update #1 set C1=?" [[null, time "2001-07-07 12:34:56.789"]];
# 別の内容にupdate
Command  "update #1 set C1=?" [[time "2001-09-09 00:00:00.000", time "2001-07-07 12:34:56.789"]];
# updateされない(はずの)タプルをinsert
Command  "insert into #1 (C1) values (?)" [[time "2002-10-11 17:34:51.000", time "2001-07-07 12:34:56.789"]];
# 存在しないタプルをwhere句で指定
Command  "update #1 set C1=? where C1=?" [[time "2001-09-09 00:00:00.000", time "2001-07-07 12:34:56.789"], [null, time "2001-07-07 12:34:56.789"]];
# 存在するタプルをwhere句で指定。片方のみ更新される
Command  "update #1 set C1=? where C1=?" [[null, time "2001-09-09 00:00:00.000"], [time "2001-09-09 00:00:00.000", time "2001-07-07 12:34:56.789"]];
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 image hint heap)";
Command  "select C1 from #1";
# SQLコマンドupdateをテストする
# update対象のタプルをまずinsert
Command  "insert into #1 (C1) values (?)" [null];
# 自分自身にupdate
Command  "update #1 set C1=?" [null];
# 別の内容にupdate
Command  "update #1 set C1=?" [binaryfile "..\\..\\doc\\rnd20k"];
# updateされない(はずの)タプルをinsert
Command  "insert into #1 (C1) values (?)" [binaryfile "..\\..\\doc\\rnd100k"];
# 存在しないタプルをwhere句で指定
# 存在するタプルをwhere句で指定。片方のみ更新される
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 image array [no limit] hint heap)";
Command  "select C1 from #1";
# SQLコマンドupdateをテストする
# update対象のタプルをまずinsert
Command  "insert into #1 (C1) values (?)" [[null, binaryfile "..\\..\\doc\\rnd10k"]];
# 自分自身にupdate
Command  "update #1 set C1=?" [[null, binaryfile "..\\..\\doc\\rnd10k"]];
# 別の内容にupdate
Command  "update #1 set C1=?" [[binaryfile "..\\..\\doc\\rnd20k", binaryfile "..\\..\\doc\\rnd10k"]];
# updateされない(はずの)タプルをinsert
Command  "insert into #1 (C1) values (?)" [[binaryfile "..\\..\\doc\\rnd50k", binaryfile "..\\..\\doc\\rnd10k"]];
# 存在しないタプルをwhere句で指定
Command  "update #1 set C1=? where C1=?" [[binaryfile "..\\..\\doc\\rnd20k", binaryfile "..\\..\\doc\\rnd10k"], [null, binaryfile "..\\..\\doc\\rnd10k"]];
# 存在するタプルをwhere句で指定。片方のみ更新される
Command  "update #1 set C1=? where C1=?" [[null, binaryfile "..\\..\\doc\\rnd20k"], [binaryfile "..\\..\\doc\\rnd20k", binaryfile "..\\..\\doc\\rnd10k"]];
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 nvarchar(32) hint heap)";
Command  "select C1 from #1";
# SQLコマンドupdateをテストする
# update対象のタプルをまずinsert
Command  "insert into #1 (C1) values (?)" ["ほげ"];
# 自分自身にupdate
Command  "update #1 set C1=?" ["ほげ"];
# 別の内容にupdate
Command  "update #1 set C1=?" [null];
# updateされない(はずの)タプルをinsert
Command  "insert into #1 (C1) values (?)" [null];
# 存在しないタプルをwhere句で指定
Command  "update #1 set C1=? where C1=?" [null, "ほげ"];
# 存在するタプルをwhere句で指定。片方のみ更新される
Command  "update #1 set C1=? where C1 is null" ["ぴよ"];
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 nvarchar(32) array [no limit] hint heap)";
Command  "select C1 from #1";
# SQLコマンドupdateをテストする
# update対象のタプルをまずinsert
Command  "insert into #1 (C1) values (?)" [["ほげ", "ホゲ"]];
# 自分自身にupdate
Command  "update #1 set C1=?" [["ほげ", "ホゲ"]];
# 別の内容にupdate
Command  "update #1 set C1=?" [["ほげ", null]];
# updateされない(はずの)タプルをinsert
Command  "insert into #1 (C1) values (?)" [["ホゲ", null]];
# 存在しないタプルをwhere句で指定
Command  "update #1 set C1=? where C1=?" [["ほげ", null], ["ほげ", "ホゲ"]];
# 存在するタプルをwhere句で指定。片方のみ更新される
Command  "update #1 set C1=? where C1=?" [["ほげ", "ぴよ"], ["ほげ", null]];
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 ntext hint heap)";
Command  "select C1 from #1";
# SQLコマンドupdateをテストする
# update対象のタプルをまずinsert
Command  "insert into #1 (C1) values (?)" [textsjisfile "..\\..\\doc\\hello.txt"];
# 自分自身にupdate
Command  "update #1 set C1=?" [textsjisfile "..\\..\\doc\\hello.txt"];
# 別の内容にupdate
Command  "update #1 set C1=?" [null];
# updateされない(はずの)タプルをinsert
Command  "insert into #1 (C1) values (?)" [null];
# 存在しないタプルをwhere句で指定
Command  "update #1 set C1=? where C1=?" [null, textsjisfile "..\\..\\doc\\hello.txt"];
# 存在するタプルをwhere句で指定。片方のみ更新される
Command  "update #1 set C1=? where C1 is null" [textsjisfile "..\\..\\doc\\Teihon.txt"];
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 ntext array [no limit] hint heap)";
Command  "select C1 from #1";
# SQLコマンドupdateをテストする
# update対象のタプルをまずinsert
Command  "insert into #1 (C1) values (?)" [[textsjisfile "..\\..\\doc\\hello.txt", textsjisfile "..\\..\\doc\\ricoh.txt"]];
# 自分自身にupdate
Command  "update #1 set C1=?" [[textsjisfile "..\\..\\doc\\hello.txt", textsjisfile "..\\..\\doc\\ricoh.txt"]];
# 別の内容にupdate
Command  "update #1 set C1=?" [[textsjisfile "..\\..\\doc\\hello.txt", null]];
# updateされない(はずの)タプルをinsert
Command  "insert into #1 (C1) values (?)" [[textsjisfile "..\\..\\doc\\ricoh.txt", null]];
# 存在しないタプルをwhere句で指定
Command  "update #1 set C1=? where C1=?" [[textsjisfile "..\\..\\doc\\hello.txt", null], [textsjisfile "..\\..\\doc\\hello.txt", textsjisfile "..\\..\\doc\\ricoh.txt"]];
# 存在するタプルをwhere句で指定。片方のみ更新される
Command  "update #1 set C1=? where C1=?" [[textsjisfile "..\\..\\doc\\hello.txt", textsjisfile "..\\..\\doc\\Teihon.txt"], [textsjisfile "..\\..\\doc\\hello.txt", null]];
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 fulltext hint heap)";
Command  "select C1 from #1";
# SQLコマンドupdateをテストする
# update対象のタプルをまずinsert
Command  "insert into #1 (C1) values (?)" [textsjisfile "..\\..\\doc\\kenpou.txt"];
# 自分自身にupdate
Command  "update #1 set C1=?" [textsjisfile "..\\..\\doc\\kenpou.txt"];
# 別の内容にupdate
Command  "update #1 set C1=?" [null];
# updateされない(はずの)タプルをinsert
Command  "insert into #1 (C1) values (?)" [null];
# 存在しないタプルをwhere句で指定
Command  "update #1 set C1=? where C1=?" [null, textsjisfile "..\\..\\doc\\kenpou.txt"];
# 存在するタプルをwhere句で指定。片方のみ更新される
Command  "update #1 set C1=? where C1 is null" [textsjisfile "..\\..\\doc\\KINGARTHURS_ROUNDTABLE.txt"];
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 fulltext array [no limit] hint heap)";
Command  "select C1 from #1";
# SQLコマンドupdateをテストする
# update対象のタプルをまずinsert
Command  "insert into #1 (C1) values (?)" [[textsjisfile "..\\..\\doc\\kenpou.txt", textsjisfile "..\\..\\doc\\rasyoumon.txt"]];
# 自分自身にupdate
Command  "update #1 set C1=?" [[textsjisfile "..\\..\\doc\\kenpou.txt", textsjisfile "..\\..\\doc\\rasyoumon.txt"]];
# 別の内容にupdate
Command  "update #1 set C1=?" [[textsjisfile "..\\..\\doc\\kenpou.txt", null]];
# updateされない(はずの)タプルをinsert
Command  "insert into #1 (C1) values (?)" [[textsjisfile "..\\..\\doc\\rasyoumon.txt", null]];
# 存在しないタプルをwhere句で指定
Command  "update #1 set C1=? where C1=?" [[textsjisfile "..\\..\\doc\\kenpou.txt", null], [textsjisfile "..\\..\\doc\\kenpou.txt", textsjisfile "..\\..\\doc\\rasyoumon.txt"]];
# 存在するタプルをwhere句で指定。片方のみ更新される
Command  "update #1 set C1=? where C1=?" [[textsjisfile "..\\..\\doc\\kenpou.txt", textsjisfile "..\\..\\doc\\KINGARTHURS_ROUNDTABLE.txt"], [textsjisfile "..\\..\\doc\\kenpou.txt", null]];
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 int hint heap)";
Command  "select C1 from #1";
# SQLコマンドupdateをテストする
# update対象のタプルをまずinsert
Command  "insert into #1 (C1) values (?)" [777];
# 自分自身にupdate
Command  "update #1 set C1=?" [777];
# 別の内容にupdate
Command  "update #1 set C1=?" [null];
# updateされない(はずの)タプルをinsert
Command  "insert into #1 (C1) values (?)" [null];
# 存在しないタプルをwhere句で指定
Command  "update #1 set C1=? where C1=?" [null, 777];
# 存在するタプルをwhere句で指定。片方のみ更新される
Command  "update #1 set C1=? where C1 is null" [333];
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 int array [no limit] hint heap)";
Command  "select C1 from #1";
# SQLコマンドupdateをテストする
# update対象のタプルをまずinsert
Command  "insert into #1 (C1) values (?)" [[777, 555]];
# 自分自身にupdate
Command  "update #1 set C1=?" [[777, 555]];
# 別の内容にupdate
Command  "update #1 set C1=?" [[777, null]];
# updateされない(はずの)タプルをinsert
Command  "insert into #1 (C1) values (?)" [[555, null]];
# 存在しないタプルをwhere句で指定
Command  "update #1 set C1=? where C1=?" [[777, null], [777, 555]];
# 存在するタプルをwhere句で指定。片方のみ更新される
Command  "update #1 set C1=? where C1=?" [[777, 333], [777, null]];
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 float hint heap)";
Command  "select C1 from #1";
# SQLコマンドupdateをテストする
# update対象のタプルをまずinsert
Command  "insert into #1 (C1) values (?)" [3.141592];
# 自分自身にupdate
Command  "update #1 set C1=?" [3.141592];
# 別の内容にupdate
Command  "update #1 set C1=?" [null];
# updateされない(はずの)タプルをinsert
Command  "insert into #1 (C1) values (?)" [null];
# 存在しないタプルをwhere句で指定
Command  "update #1 set C1=? where C1=?" [null, 3.141592];
# 存在するタプルをwhere句で指定。片方のみ更新される
Command  "update #1 set C1=? where C1 is null" [1.414213];
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 float array [no limit] hint heap)";
Command  "select C1 from #1";
# SQLコマンドupdateをテストする
# update対象のタプルをまずinsert
Command  "insert into #1 (C1) values (?)" [[3.141592, 2.718281]];
# 自分自身にupdate
Command  "update #1 set C1=?" [[3.141592, 2.718281]];
# 別の内容にupdate
Command  "update #1 set C1=?" [[3.141592, null]];
# updateされない(はずの)タプルをinsert
Command  "insert into #1 (C1) values (?)" [[2.718281, null]];
# 存在しないタプルをwhere句で指定
Command  "update #1 set C1=? where C1=?" [[3.141592, null], [3.141592, 2.718281]];
# 存在するタプルをwhere句で指定。片方のみ更新される
Command  "update #1 set C1=? where C1=?" [[3.141592, 1.414213], [3.141592, null]];
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 datetime hint heap)";
Command  "select C1 from #1";
# SQLコマンドupdateをテストする
# update対象のタプルをまずinsert
Command  "insert into #1 (C1) values (?)" [time "2001-07-07 12:34:56.789"];
# 自分自身にupdate
Command  "update #1 set C1=?" [time "2001-07-07 12:34:56.789"];
# 別の内容にupdate
Command  "update #1 set C1=?" [null];
# updateされない(はずの)タプルをinsert
Command  "insert into #1 (C1) values (?)" [null];
# 存在しないタプルをwhere句で指定
Command  "update #1 set C1=? where C1=?" [null, time "2001-07-07 12:34:56.789"];
# 存在するタプルをwhere句で指定。片方のみ更新される
Command  "update #1 set C1=? where C1 is null" [time "2002-10-11 17:34:51.000"];
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 datetime array [no limit] hint heap)";
Command  "select C1 from #1";
# SQLコマンドupdateをテストする
# update対象のタプルをまずinsert
Command  "insert into #1 (C1) values (?)" [[time "2001-07-07 12:34:56.789", time "2001-09-09 00:00:00.000"]];
# 自分自身にupdate
Command  "update #1 set C1=?" [[time "2001-07-07 12:34:56.789", time "2001-09-09 00:00:00.000"]];
# 別の内容にupdate
Command  "update #1 set C1=?" [[time "2001-07-07 12:34:56.789", null]];
# updateされない(はずの)タプルをinsert
Command  "insert into #1 (C1) values (?)" [[time "2001-09-09 00:00:00.000", null]];
# 存在しないタプルをwhere句で指定
Command  "update #1 set C1=? where C1=?" [[time "2001-07-07 12:34:56.789", null], [time "2001-07-07 12:34:56.789", time "2001-09-09 00:00:00.000"]];
# 存在するタプルをwhere句で指定。片方のみ更新される
Command  "update #1 set C1=? where C1=?" [[time "2001-07-07 12:34:56.789", time "2002-10-11 17:34:51.000"], [time "2001-07-07 12:34:56.789", null]];
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 image hint heap)";
Command  "select C1 from #1";
# SQLコマンドupdateをテストする
# update対象のタプルをまずinsert
Command  "insert into #1 (C1) values (?)" [binaryfile "..\\..\\doc\\rnd10k"];
# 自分自身にupdate
Command  "update #1 set C1=?" [binaryfile "..\\..\\doc\\rnd10k"];
# 別の内容にupdate
Command  "update #1 set C1=?" [null];
# updateされない(はずの)タプルをinsert
Command  "insert into #1 (C1) values (?)" [null];
# 存在しないタプルをwhere句で指定
# 存在するタプルをwhere句で指定。片方のみ更新される
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 image array [no limit] hint heap)";
Command  "select C1 from #1";
# SQLコマンドupdateをテストする
# update対象のタプルをまずinsert
Command  "insert into #1 (C1) values (?)" [[binaryfile "..\\..\\doc\\rnd10k", binaryfile "..\\..\\doc\\rnd20k"]];
# 自分自身にupdate
Command  "update #1 set C1=?" [[binaryfile "..\\..\\doc\\rnd10k", binaryfile "..\\..\\doc\\rnd20k"]];
# 別の内容にupdate
Command  "update #1 set C1=?" [[binaryfile "..\\..\\doc\\rnd10k", null]];
# updateされない(はずの)タプルをinsert
Command  "insert into #1 (C1) values (?)" [[binaryfile "..\\..\\doc\\rnd20k", null]];
# 存在しないタプルをwhere句で指定
Command  "update #1 set C1=? where C1=?" [[binaryfile "..\\..\\doc\\rnd10k", null], [binaryfile "..\\..\\doc\\rnd10k", binaryfile "..\\..\\doc\\rnd20k"]];
# 存在するタプルをwhere句で指定。片方のみ更新される
Command  "update #1 set C1=? where C1=?" [[binaryfile "..\\..\\doc\\rnd10k", binaryfile "..\\..\\doc\\rnd50k"], [binaryfile "..\\..\\doc\\rnd10k", null]];
Command  "select C1 from #1";
Command  "drop table #1";

TerminateSession;
# DBの後始末
InitializeSession "";
Command "drop database TESTDB";
TerminateSession;
Terminate;
End;
