Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^3: Code flow not going to while loop

by chacham (Prior)
on Aug 02, 2017 at 20:25 UTC ( #1196588=note: print w/replies, xml ) Need Help??


in reply to Re^2: Code flow not going to while loop
in thread Code flow not going to while loop

You might need to change your values to match those expected by TIMESTAMP.

  • Comment on Re^3: Code flow not going to while loop

Replies are listed 'Best First'.
Re^4: Code flow not going to while loop
by dipit (Sexton) on Aug 02, 2017 at 20:31 UTC
    These are the same strings used in database. I cannot change them. You can see the code and i have run my test server also.
    db2 "select distinct fid_cust from session where DAT_END between TIMES +TAMP('2017-01-01 00:00:00') and TIMESTAMP('2017-01-31 00:00:00')" FID_CUST -------------------------------------------------- Lena2 TEST

      Hmm... Maybe the client on your test server is supplying a default that the code is not. Let's take a look at TIMESTAMP.

      A string of length 14 that is a string of digits that represents a valid date and time in the form yyyyxxddhhmmss, where yyyy is the year, xx is the month, dd is the day, hh is the hour, mm is the minute, and ss is the seconds.

      You could provide that if you remove the spaces and colons.

      If the arguments include only date information, the time information in the result value is all zeros.

      I do not know if your code demands it, but all your times are zeroes. Meaning, you could just as well remove the time part and TIMESTAMP() will return the same result.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1196588]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2020-12-05 12:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you use taint mode?





    Results (63 votes). Check out past polls.

    Notices?