저같은경우에는
Query1.close;
Query1.SQL.Clear;
Query1.SQL.ADD(' select * from 테이블 ');
Query1.SQL.ADD(' where 날짜 ');
Query1.Open;
이렇게 조회하셔서
if Query1.recordCount > 0 then //데이터 존재
begin
Query1.Close;
Query1.SQL.Clear;
Query1.SQL.ADD(' UPDATE ........ ');
Query1.SQL.ADD(' WHERE 날짜 ');
end
else
begin
Query1.Close;
Query1.SQL.Clear;
Query1.SQL.ADD(' INSERT ........ ');
Query1.SQL.ADD(' WHERE 날짜 ');
end;
Query1.close;
Query1.SQL.Clear;
Query1.SQL.ADD(' select * from 테이블 ');
Query1.SQL.ADD(' where 날짜 ');
Query1.Open;
이렇게 조회하셔서
if Query1.recordCount > 0 then //데이터 존재
begin
Query1.Close;
Query1.SQL.Clear;
Query1.SQL.ADD(' UPDATE ........ ');
Query1.SQL.ADD(' WHERE 날짜 ');
end
else
begin
Query1.Close;
Query1.SQL.Clear;
Query1.SQL.ADD(' INSERT ........ ');
Query1.SQL.ADD(' WHERE 날짜 ');
end;