Q&A

  • 데이타베이스
with Query1 do begin

Close;

SQL.Clear;

SQL.Add('SELECT E201FNM, E201PNM, E201MAD,Q202LDT, Q202LNO, Q202LFD, Q209STC, Q209SNM');

SQL.Add('FROM ET201 INNER JOIN QM202');

SQL.Add('ON E201TNO = Q202TNO');

SQL.Add('INNER JOIN QM209');

SQL.Add('ON Q202STC = Q209STC');

SQL.Add('WHERE Q202LDT BETWEEN "'+MaskEdit1.Text+'" AND "'+MaskEdit2.Text+'"');

// SQL.add('WHERE E201TNO (BETWEEN "'1048100392'" AND "'1190860157'") AND Q202LDT (BETWEEN "'1989-01-01'" AND "'1989-12-20'")');

SQL.Add('ORDER BY E201FNM');

Open;

end;



마스크에디터부분좀해결해주세요







필드에러가납니다.

1  COMMENTS
  • Profile
    김정선 2000.03.11 07:50
    이러면 어떠하실지..



    날짜 들어가는 where 절을

    SQL.Add('WHERE TO_CHAR( Q202LDT, ''MM/DD/YYYY'' ) BETWEEN "'+MaskEdit1.Text+'" AND "'+MaskEdit2.Text+'"');



    위에서 MM/DD/YYYY Date Type 은 에디트 박스 형태에 따라 바꾸시면 될거에요..





    행복하세요..





    - 어설푼 이 입니다 -









    조영진 wrote:

    > with Query1 do begin

    > Close;

    > SQL.Clear;

    > SQL.Add('SELECT E201FNM, E201PNM, E201MAD,Q202LDT, Q202LNO, Q202LFD, Q209STC, Q209SNM');

    > SQL.Add('FROM ET201 INNER JOIN QM202');

    > SQL.Add('ON E201TNO = Q202TNO');

    > SQL.Add('INNER JOIN QM209');

    > SQL.Add('ON Q202STC = Q209STC');

    > SQL.Add('WHERE Q202LDT BETWEEN "'+MaskEdit1.Text+'" AND "'+MaskEdit2.Text+'"');

    > // SQL.add('WHERE E201TNO (BETWEEN "'1048100392'" AND "'1190860157'") AND Q202LDT (BETWEEN "'1989-01-01'" AND "'1989-12-20'")');

    > SQL.Add('ORDER BY E201FNM');

    > Open;

    > end;

    >

    > 마스크에디터부분좀해결해주세요

    >

    >

    >

    > 필드에러가납니다.