- This topic has 2 replies, 2 voices, and was last updated 8 years, 6 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
Integrated Application Platform
Integrated Application Platform › Forums › General › A curious quote
Hi,
I was working with QueryView and found something curious:
update dengueMaha where dateAdmn = "1.8.13 P" set doAdmn = ' $ Display(Date(day:1, month:8, year: 2013))
-> works well! [Note that there is only one quote and not a pair]
'update dengueMaha where dateAdmn = "1.8.13 P" set doAdmn = ' $ Display(Date(day:1, month:8, year: 2013))
-> generates an error message [a pair of quotes]
update dengueMaha where dateAdmn = "1.8.13 P" set doAdmn = $ Display(Date(day:1, month:8, year: 2013))
-> also generates error [no quotes]
Are you able to get the same results? Why does QueryView need one quote and not a pair? Is it a bug?
This doesnt give the result I want. How does one update a field to have a date?
QueryDo('update dengueMaha where dateAdmn = ".7.13" set doAdmn = Date(day:15, month:7, year: 2013)')
is throwing an error
ajith
Hi Ajith,
That behavior is a bit curious. It looks like it is assuming the one quote is the beginning of the string you are going to set doAdmn to. It seems if you are setting a column to a string in queryview, the last quote is not needed.
If you query the table after the request, you’ll see it is not setting the value properly.
If you want to set the field to a variable date you could use the following:
QueryDo(‘update dengueMaha where dateAdmn = “1.8.13 P” set doAdmn = ‘ $ Display(Date(day:1, month:8, year: 2013)))
If you are just setting to a date constant you can do:
update dengueMaha where dateAdmn = “1.8.13 P” set doAdmn = #20130801
Hi Jeff,
Thanks for the reply. Both the ways you suggested are working.
ajith