hatena
hatena
2022/07/28 (木) 22:46:19
下記でうまくいきませんかね。
SELECT
Left(T1.レースID馬,16) AS レースID1
,0 AS 返還フラグ
,4 AS 券種
,Val(Right(T1.レースID馬,2)) AS 軸2
,0 AS 空白
,100 AS 購入金額
,Null AS 空白2
,"A" AS 自信
,Left(T2.レースID馬,16) AS レースID2
,Val(T2.レースID馬,2)) AS ヒモ
FROM
MT_指数追加 AS T1 INNER JOIN MT_指数追加 AS T2
ON Left(T1.レースID馬,16) = Left(T2.レースID馬,16)
WHERE T1.順位=2 AND T2.順位=5;
通報 ...