• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

Issue using timestamp as appvar

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

  • Issue using timestamp as appvar

    I'm using a current timestamp that is populated in a backend helper program to figure out if a current user is already logged in to my system or not. Once it determines if they are already logged in, it loads data from a data source using the vvin_virtual syntax in SQL, the issue arises when I try to set an app variable with the value of the timestamp.
    Because the setAppVar prototype only accepts character input, I have to convert the timestamp to char and then pass it. but once I try to compare that to a timestamp column in the data source and proceed to the preview it simply says "Invalid SQL Statement." I've tried using SQL CONVERT() and CAST() on the main column to convert it to a char, but both of those return an error saying "SQL0104 - Token ( was not valid. Valid tokens: )." Below is my current SQL statement, any help would be appreciated.


  • #2
    I think you may have forgotten to paste in your SQL statement.

    Comment


    • #3
      Weird, it shows up in my first message on my end, here it is again, hopefully

      sql statement.png

      Comment


      • #4
        Hi,

        Since its a timestamp the vvIn_Virtual needs a valid default value to pass SQL validation. So I would recommend setting the default values to '0001-01-01-00.00.00.000000'

        Comment

        Working...
        X