Reputation: 1068
I have one column wherein I am converting domain_name to 64 bit bigint string.
it successfully converting it.
CONV(SUBSTRING(CAST(SHA(TRIM("#arguments.domain_name#")) AS CHAR), 1, 16), 16, 10),
I want use this converted string in another table and trying to store it as Integer. when i have tried casting it like this
CAST(arguments.siteid AS INT(11) AS INTEGER)
got error; You have an SQL syntax error.
I have tried to store it in another way like
<cfqueryparam value="#arguments.siteid#" cfsqltype="cf_sql_integer" />
it is storing something else like 2147483647
though the siteid is 14177909183865716377
.
can anyone help me how to cast it ?
Upvotes: 1
Views: 554
Reputation: 29870
Upgrading my observation in a comment to an answer, given it was borne out to be the case:
I think you'll find 2147483647 is the biggest value you can put in an integer. You'll need to use an unsigned BIGINT, I think, based on the docs: "MySQL 5.0 Reference Manual :: 11 Data Types :: Integer Types (Exact Value)".
Upvotes: 5