使用SQL语句?还是用Delphi编程?

解决方案 »

  1.   

    都可以。SQL可以用 字段 is null 来查找符合条件的。DELPHI可以用VARTOSTR(FIELDBYNAME('字段').AsVariant)= ''。
      

  2.   

    都可以
    SQL:IsNull
    Delphi:字段.Isnull
      

  3.   


    MSSQL  IsNull(A,0.00) ; // 如果字段為NULL,就顯示0if AdoQuery1.fieldbyname('A').isNull   //  判斷這個字段是否為NULL
      

  4.   

    这样的SQL语句怎么写?类似Delphi那样?
    if 某个字段 isNull  then
    执行语句1;
    else
    执行语句2;
      

  5.   


    if AdoQuery1.fieldbyname('A').isNull then 
      ShowMessage('字段A為空')
    else 
     ShowMessage('字段A 不為空')
      

  6.   

    declare @d varchar(1000)
    select @d=field1 from tb where ...
    if @d is null
    begin
      ...
    end
    else
    begin
      ...
    end
      

  7.   

    一个记录的每一个字段都需要先逐个判断,然后决定是使用insert或update?