I have SDO_GEOMETRY objects in Oracle 18c: In a query, I want to select the SDO_GEOMETRY’s sdo_point attribute as literal text (for concatenation purposes). Example: (fails) I don’t know how to convert that object attribute to text. I’ve tried using the SDO_UTIL.TO_WKTGEOMETRY() function. But that only seems to work on a point geometry as a whole, not on the specific
Tag: type-conversion
T-SQL :: Error converting data type varchar to numeric when changing 1 to 0.5
I’m writing a complex T-SQL query with CASE that will help me calculate how much time it will take me to migrate databases based on the size of each database: All good, it works when I set 1 hour of work for every database which has less then 100.00 MB. Also all other values are summed and in the Hours
Convert character to number, like +00005 to 5
We have the fixed format data and it has the number with plus/minus sign, like +00005 or -00005. We’d like to convert it to number but Redshift seems not to allow implicit conversion. So, I temporarily use to_number(replace(<numbercolumn>, ‘+’, ”),’99999′) But I guess there should be more better solutions. Anyone know more smart way, your advice would be highly appreciated.
Error converting data type nvarchar to numeric convert/cast
I suspect this has to do with reporting ClientName, which is a nvarchar data type. AUMid is nchar. I’m not sure how to work around this without changing the data types (which I prefer not to). I need to display Clients.ClientName. It is linked to the AUM table via AUM.AUMid. Removing SUM(AUM.AUM * AUM.ManagementFee) AS Management_Fee allows the query to
Datatype conversion and calculated column
I have a table with the following structure: Unfortunately, the sale_date is stored as INT and I had to find a way to convert it in quarter (202001 will be Q1). The conversion worked well, but I need to include also some calculated columns based on this conversion. Basically, I need to calculate for Q1 the total price for each
Problem reading uniqueidentifier from SQL response
I have tried to find the solution for this problem, but keep running my head at the wall with this one. This function is part of a Go SQL wrapper, and the function getJSON is called to extract the informations from the sql response. The problem is, that the id parameter becomes jibberish and does not match the desired response,
SQL Server client String to (forced) integer conversion issue [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago. Improve this question Okay I’m using VB.net and added a SQL Server connection (.mdf file), and a table. I have CHANGED the input
Pass subquery value to IN statement
In one table named prefs, I have a column named “Value” of type clob that holds this value: ‘T’, ‘L’ I need to query table attendance_code to retrieve the records where column att_code values are either T or L. The att_code column is of type varchar2. As a manual model query, this works fine: Attempt 1 Attempt 2 This yields
Stored Procedure Data Type Conversion Error
I try to execute the following SP it gives me this following error. Msg 8114, Level 16, State 5, Procedure TEST, Line 55 [Batch Start Line 12] Error converting data type nvarchar to …
Convert/get varchar variable to YYYYMM
I have 4 CTE’s in this table and the third one contains a DATETIME converted to VARCHAR (with format based on the requirement) as startDate in DD/MM/YYYY format. The last cte does calculations based …