sql request is: the type of DRCR_CR_DT is: DATE DRCR_CR_DT contain something like this : 1/4/2022 2:02:54 PM thank you for the answer Answer I’d expect something different; if date you provide is 1/4/2022, then there’s no mon format model in it: When fixed: If that’s not it, please, provide sample data (CREATE TABLE and INSERT INTO statements). [EDIT] This
Tag: oracle
reference primary key from another table [closed]
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers. Closed last month. Improve this question I
SQL query to group consecutive records without destroying the chronological order
I have a table looking like this: GR I VON BIS 1 a 1 2 2 b 2 3 1 c 3 4 1 d 4 5 3 e 5 6 Column “GR” is the info I want to use for grouping. Column “I” holds some none important info. Column “VON” holds originally a date value – for readability I
Convert SDO_GEOMETRY’s sdo_point attribute to text
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
Convert VARRAY to text (for concatenation)
I have a query that outputs a VARRAY: In SQL Developer, the VARRAY gets output as text: Question: Similar to what SQL Developer does, is there a way to convert the VARRAY to text using SQL — so that I can concatenate the value in a string? Example: (fails) Just a heads up: DB<>FIDDLE doesn’t seem to output VARRAYS correctly.
Oracle using MOD command to set Y/N on INSERT
I’m trying to generate some sample data for the following table see below. I have functions that can generate a random DATE and timestamp within a date range, which is working fine. I want to use the MOD command to populate the active field to ‘Y’ OR ‘N’. I want to set every row to active=’Y’ except for every 5th
I’m trying to join 2 tables that don’t have same columns and using case select. Is this possible?
table 1 code value 0 None 1 R 2 W 4 C 8 D 16 U 32 Uown Table 2 number 0 1 2 3 4 5 8 12 13 16 20 25 26 27 32 43 44 45 60 61 62 63 64 68 70 expected output is number output 0 0 1 1 2 2 3 2,1 4
Get all employee detail from employees table whose “First_name” start with any single character between ‘a-p’
is there any new way to rewrite the SQL Query to find the first_name starting from A to P Answer Use regexp_like: The regex breakdown: ^ means “start of text” [a-p] means “any character in the range à to p inclusive” The i flag means “ignore case”
Generate rows from JSON (SDO_GEOMETRY)
I have a multi-part SDO_GEOMETRY that I can represent as JSON (Oracle 21c): As an experiment, I want to find a way to generate rows from the JSON: Each row is a vertex of the geometry. Question: In an SQL query, is there a way to generate rows for each of the JSON vertices? I’m aware that SDO_GEOMETRY has a
Find rows with duplicate values in two columns where at least one value in one column is a specific value
So, I’m not sure how it works and I haven’t found a sufficient answer by googleing (probably not using the right buzz words). So here it comes: Let’s say I have a table like this, let’s call it persons ID Name First Name Country 1 Doe John USA 2 Doe John UK 3 Doe John Brazil 4 Meyer Julia Germany