oracle-sqldeveloper

How to execute plpgsql anonymous block in Oracle SQL Developer?

五迷三道 提交于 2019-12-25 04:11:59
问题 If I execute single SQL statements in worksheet (eg CREATE ROLE my_user LOGIN PASSWORD 'my_pwd' VALID UNTIL 'infinity'; ) then is works correctly. Wrapping it in anonymous block like this: DO $$ BEGIN CREATE ROLE my_user LOGIN PASSWORD 'my_pwd' VALID UNTIL 'infinity'; END $$; and I get following error message: Error starting at line : 3 in command - BEGIN CREATE ROLE my_user LOGIN PASSWORD 'my_pwd' VALID UNTIL 'infinity'; END $$; Error report - ERROR: syntax error at or near "CREATE" Position

Automatically extracting data - Oracle SQL Developer

99封情书 提交于 2019-12-25 03:55:25
问题 I have a connection to an Oracle database via SQL Developer and I want to write a query that returns a monthly set of data and then extract that data to a delimited text file. I know how to do that just fine, what I am wondering is if there is a way to write a script to run the query and extract the data month by month for a year. That way I would kick off the script and whenever it all finishes I would have 12 text files, one for each month. I could do it manually but it is a lot of data and

Automatically extracting data - Oracle SQL Developer

帅比萌擦擦* 提交于 2019-12-25 03:55:09
问题 I have a connection to an Oracle database via SQL Developer and I want to write a query that returns a monthly set of data and then extract that data to a delimited text file. I know how to do that just fine, what I am wondering is if there is a way to write a script to run the query and extract the data month by month for a year. That way I would kick off the script and whenever it all finishes I would have 12 text files, one for each month. I could do it manually but it is a lot of data and

Need help linking oracle tables in MS Access

北慕城南 提交于 2019-12-25 02:46:12
问题 I am having some issues connection to an oracle DB using MS Access. If I use SQL Developer to connect to the Oracle DB I see pretty much every table and view in the DB however when I connect using MS Access I only get a selected few. I tough it was because the user didn't have Select privileges on the tables I need so I requested the privilege and after a moth of waiting I finally got it but I still cant see the tables on the Access tool. This is what I see on SQL Developer vs MS access. I

i cannot find a hint on 'Oracle SQL Developer' and 'Oracle Database 12c' inside Linux shell

送分小仙女□ 提交于 2019-12-25 02:38:10
问题 I want to run 'Oracle Database 12c' for training purposes, but as i've installed 'Oracle OTN Developer Day'(Linux 6 works) i cannot find a hint on 'Oracle SQL Developer' and 'Oracle Database 12c' inside this Linux shell? In docs on 'Oracle OTN Developer Day' i find its contents: Oracle Linux 6.5 Oracle Database 12c Release 1 Enterprise Edition Oracle XML DB Oracle SQL Developer Oracle SQL Developer Data Modeler Oracle Application Express Hands-On-Labs (accessed via the Toolbar Menu in Firefox

SQL . Timestamp issue with max value

假装没事ソ 提交于 2019-12-25 00:52:53
问题 Hello I have a sql script like this. My intention of the script is to produce out the highest value of today. However the script produce out an unintended result. Can anyone help me look at my code and see what is wrong with it ? Script SELECT MAX(Value), TIMESTAMP, fooditem, cashcurren FROM farm1 WHERE r.timestamp > 1405987200 AND r.timestamp <= (1405987200 + 86400) AND fooditem = '2' AND cashcurren = '10' GROUP BY timestamp, fooditem, cashcurren; The Unintended Result Value Timestamp

Creating a DDL for a baseline for flyway

让人想犯罪 __ 提交于 2019-12-25 00:36:48
问题 I've got an oracle 11 XE database, with 3 schemas in it, that I want to create a DDL file for to make a baseline script to use with flyway. I've tried to export just the DDL of all 3 schemas, but the resulting sql doesn't include the creation of the users, or the creation of the tablespaces. It just starts off with sql to create tables, which will not work as the users or the tablespaces don't exist. Is there any way to do this with sql-developer or am I using the wrong tool for the job here?

How to remove hidden double quotes in column values of SQL Developer

好久不见. 提交于 2019-12-25 00:12:52
问题 Some of the column values in my table are enclosed within double quotes and I need to remove those double quotes. The problem is, I am not able to view the double quotes symbol in SQL Developer (version 4.2.0.16.260). But when I copy the data to Notepad++, there I am getting double quotes. I tried instr to get the position of double quotes, its returning the result 0. Also I tried to replace double quotes with blank, but they are not being removed. Below is the data I see when copied to

Using CASE statement compare 3 conditions and have the statements executed

痴心易碎 提交于 2019-12-24 21:09:04
问题 I have a requirement where in i'm supposed to take 3 dynamic values from the user and compare with the list of values present based on match of it I need to have conditions to be added to where clause using case statement. select * from MY_DBSOURCE WHERE 1=1 And LP_WHERE_REP = (CASE When :LP = 'LIFESHEILD' AND :M = 'AP' AND :STATUS = 'Processed' THEN flag ='P' and Manual_FLAG = 'P' END) AND DATA_SOURCE IN ('LIFESHIELD') AND DATE_CLOSED >= '15-JUL-2019' AND DATE_CLOSED <= '16-JUL-2019' 回答1: