CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    May 2003
    Posts
    6

    Question Cant select the data from database where field = ""

    I am using ODBC to connect crystal report to MYSQL database. I am wondering why i cant select a data from a tables where a field in a table is equal to "" (that mean nothing in the field,but not null,just nothing).

    I right click on the field at the table..then click select expert
    -> click equal to "" , but when run the crystal report,nothing select? how can i fix this problem?

    thanks for help.

  2. #2
    Join Date
    Sep 2000
    Location
    FL
    Posts
    1,452
    not really the conventional method but you could try something like.

    SELECT * FROM A WHERE Ts < char(0);

    Or in the select records expert use

    "is"
    "less than"
    and
    "char(0)"

    Works on my MySQL and CR (Original CR with VS 6.0)

    Hope this helps.

  3. #3
    Join Date
    Jan 2003
    Location
    7,107 Islands
    Posts
    2,487
    ..Or trim the field

    SELECT * FROM Table1 WHERE TRIM(Field1) = '';
    Busy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured