ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Query help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Query help

    I'm trying to use the Qry400 tool and it's been awhile! What I am wanting to do is check a date field and if it is blank I want that record. The problem I am running into is that it is a date field so I can't figure out how to check if it is blank. Can someone please help. Thanks!!

  • #2
    Re: Query help

    if it's a true date field it can never be blank!
    I'm not anti-social, I just don't like people -Tommy Holden

    Comment


    • #3
      Re: Query help

      Hi Twiggins:

      The default for a date field is 01/01/0001....Depending on your system's date format.

      If the file isn't too big sort by the date field and the default ones should be first

      Best of Luck
      GLS
      The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

      Comment


      • #4
        Re: Query help

        There is no such thing as a blank date field. A date field always has a value, the same goes for Time fields. What I usually do is assign a date value of '0001-01-01' to represent a date field that hasn't been populated.

        Comment


        • #5
          Re: Query help

          Awww, that was it. I used 0001-01-01 and that worked great. Thanks!

          Comment

          Working...
          X