Skip to content
Advertisement

Tag: casting

One large DB request plus many Casts vs. many single DB requests – which is faster for a lot of Data [closed]

Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 2 years ago. Improve this question let’s say you have 5 concrete classes implementing the interface IResult. And you want to work with many diffrent concrete objects

Redshift casting decimal to decimal

Why does casting a decimal to decimal lose all decimals? For example, Returns 2 Answer A decimal number has a precision (the total number of significant digits in the whole number) and a scale (the number of decimal digits). In Redshift, the default precision is 18, but the default scale is 0, and automatic rounding is applied when casting, as

Cannot figure out the issue with this SQL CASE

The issue i am facing is: “SYNTAX_ERROR: line 7:6: All CASE results must be the same type: boolean” I have also joined the table in a previous sub query casting it as a varchar, so there shouldn’t be any issues with this. Anyone have any ideas? For context i am trying to populate a field that would return a blank

Casting the Bigint number Returns NULL

I need o convert a integer value to the highest data type in hive as my value is of 25 digits NULL value will be returned for the above select stmnt; I am very well aware that the supplied number is greater than the largest number of Bigint. But we are getting such values upon which i have to calculate

Convert INT to DATETIME (SQL)

I am trying to convert a date to datetime but am getting errors. The datatype I’m converting from is (float,null) and I’d like to convert it to DATETIME. The first line of this code works fine, but I get this error on the second line: Arithmetic overflow error converting expression to data type datetime. Answer you need to convert to

Advertisement