Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
7 replies
Subscribers
7 subscribers
Views
2403 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
Hi, I am executing a query through executequery() expression rule. To the q
sikhivahans
over 11 years ago
Hi,
I am executing a query through executequery() expression rule. To the query, i am passing an number(integer) input dynamically. The input numbers are like this : 1363852714818, 1363852714900 etc. But while passing the input as parameter, the query is unable to accept this much big number. Could anyone provide a solution for this asap?
Thanks in advance.....
OriginalPostID-61634
OriginalPostID-61634
Discussion posts and replies are publicly visible
0
mathanap
over 11 years ago
The nast numbers like as you have, can't be stored in Number(Integer). You can store tem only on Number(Decimal). In CDT too, you need to annotate 'Decimal or Double' for that sepecified column with large number. Thus by you can avoid problems while storing that large numbers in DB.
Regarding XSD annotation refer :
forum.appian.com/.../Defining_a_Custom_Data_Type
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 11 years ago
@mathanp
I don't need to store any number.The scenario is as follows: I need to pass a number(which is timestamp of oracle) and convert into datetime format. For this the number needed to be passed exactly.
executequery("jdbc/AppianPrimaryDS","SELECT TO_CHAR(
FROM_TZ(
CAST(to_date('1-1-1970 00:00:00','DD-MM-YYYY HH24:Mi:SS')+(&ri!epochNumber&/86400000) AS TIMESTAMP)
, '+00:00'
)
AT TIME ZONE '+05:30'
, 'DD-MON-YYYY HH24:Mi:SS')
FROM DUAL")
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
mathanap
over 11 years ago
Change the rule input type to decimal and try the following syntax
executequery("jdbc/AppianPrimaryDS","SELECT TO_CHAR(
FROM_TZ(
CAST(to_date('1-1-1970 00:00:00','DD-MM-YYYY HH24:Mi:SS')+("&ri!epochNumber&"/86400000) AS TIMESTAMP)
, '+00:00'
)
AT TIME ZONE '+05:30'
, 'DD-MON-YYYY HH24:Mi:SS')
FROM DUAL")
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 11 years ago
@mathanap No, i have already tried it and its not working. Could you please suggest some other way?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
mathanap
over 11 years ago
Can you please post the error(or) response obtained while executing it?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
mathanap
over 11 years ago
If you don't mind can you share the database type?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 11 years ago
@mathanp sorry for the delay. I came to work today itself after friday. I got the solution. Thanks for the suggestions..
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel