toad

ORA-00936 When using date function in the oracle select statement

落花浮王杯 提交于 2019-12-23 04:29:00
问题 I have a query that I'm trying to aggregate data based on hours between two unix timestamps in Oracle. Hardest part is that I get error'd out with " ORA-00936: missing expression " error even I don't see anything wrong in the query. Need some expert advice here. Below is the query - Query - select DATE(FROM_UNIXTIME(C.DATETIMEORIGINATION)) the_date, HOUR(FROM_UNIXTIME(C.DATETIMEORIGINATION)) the_hour, count(c.RECORD_ID) the_count FROM TABLE_A C WHERE C.DATETIMEORIGINATION between 1380033019

How to import excel data into Toad 9.5 table

此生再无相见时 提交于 2019-12-23 03:57:36
问题 How to import Excel data into Toad 9.5 Table I have Toad for Oracle 9.5 and MS Excel 2007. I want to import Excel data into Oracle table using Toad. Please let me know the steps, how to do that. Thanks 回答1: try the following methods METHOD 1: Click Tools → Import → Import Wizard. This window can be used to import data from various kinds of source files into a table. METHOD 2: SQL*Loader You can use TOAD's interface to a program from Oracle called sqlloader. Save the Excel file as a comma

Weird characters added to first column name after reading a toad-exported csv file

别说谁变了你拦得住时间么 提交于 2019-12-18 12:58:06
问题 Whenever I read a csv file in R ( read.csv("file_name.csv") ) that was exported using toad, the first column name is preceded by the following characters " ï.. ". Also, opening the csv file in excel or notepad++ shows up correctly (without the preceding characters). This is a hassle as my workaround has been to rename the column after each read. Thanks for any fix to this issue! Edit: The export was created in Toad by right-clicking on the result set of a query and selecting 'Quick Export ->

Why oracle stored procedure execution time is greatly increased depending on how it is executed?

人走茶凉 提交于 2019-12-18 12:33:05
问题 This is my problem: we have a stored procedure called HEAVY_SP and depending on how it is executed, execution time is greatly increased: (1) Call execution Direct execution in Oracle SQL Developer IDE CALL HEAVY_SP(0, 'F', 5, ...) takes 15 seconds (our current solution) (2) Using play button Opening the procedure using Oracle SQL Developer and executing the "play" button: takes 15 seconds (3) dbms_job : scheduled mode takes 15 seconds (4) dbms_job : instant execution mode takes more than 1

Reference a table in other schema omiting schema name

孤街醉人 提交于 2019-12-18 09:41:33
问题 If I have a table sch1.tab1 is it possible to call it from schema/user sch2 just with select * from tab1 (assume that we have all the privilegies)? I am aware that in postgresql you can set the search path where db would look for tables which enables you to omit the schema when you are referencing a table but I do not know if this exists in oracle. Thank you. 回答1: You can create a synonym, but you'd have to make one for each table you wanted to access; from sch2 : create synonym tab1 for sch1

ORACLE抓低效的SQL语句

我与影子孤独终老i 提交于 2019-12-16 19:40:29
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> ORACLE抓低效的SQL语句 转载 ORACLE_FANS 发布于2013-01-19 00:59:14 阅读数 1996 收藏 展开 信息系统访问量又不大,瓶颈一般不会出现在应用层,极有可能在数据库这一层,不用急着看程序。先找出逻辑读取次数最多的SQL,硬盘读取次数最多的SQL,找到SQL,对于SQL进行优化。看看有没有发生全表扫描的地方。 一般发生全表扫描,极有可能是没有建立合理的索引,或者索引由于左边引用函数或其它原因造成索引失效。 对于运行一年多的系统,最好要自己写一个自动重建索引的程序,定时重建索引。 或者使用TOAD工具帮你重建索引。 另外在看一下数据库的CPU占用率,如果占用率在经常在80%-100%,那一定要是SQL或存储过程及trigger中写的不好。 不需要从应用层找SQL,方向性错误,太累,也看不出效果。 而应当使用pl/SQL, toad等工具,分析出最bad的SQL语句,一看到这些语句后,再修改应用层的查询就是了。又快又方便。 -- 逻辑读多的SQL select * from (select buffer_gets, sql_text from v$sqlarea where buffer_gets > 500000 order by buffer_gets desc) where

How to get my PUT_LINE statement to display in TOAD?

点点圈 提交于 2019-12-13 11:42:11
问题 This code compiles, but in TOAD it won't show the "hi wo" output CREATE OR REPLACE PROCEDURE AdelTest IS tmpVar NUMBER; BEGIN DBMS_OUTPUT.ENABLE(100: in INTEGER); DBMS_OUTPUT.PUT_LINE('hi wo'); tmpVar := 0; EXCEPTION WHEN NO_DATA_FOUND THEN NULL; WHEN OTHERS THEN --consider logging error then r-raise RAISE; END AdelTest; How do I show the output(similar to how println shoots to console in Java ) ? 回答1: You need to enable DBMS Output. If working in the Editor right-click and choose DBMS Output

how to submit and post a search field using pl sql

浪子不回头ぞ 提交于 2019-12-13 07:24:16
问题 i would like my button to be embedded within this cursor. so when a user inputs data onto the 'search_field' and clicks the button 'Unsuspend', the Process SCRIPT should run and post 3 different information (Student_no, Suspend_account, and Student_name ) onto my next page. is there any java script i have to include if so please help. if not what can i do to run the process script. --Process SCRIPT-- CURSOR C_STUDENTS(P_TERM VARCHAR2) IS SELECT SZRASPR_STUDENT_NO STUDENT, SZRASPR_PIDM PIDM,

Connecting to DB2 database

醉酒当歌 提交于 2019-12-13 05:26:40
问题 I get the following error when I try to connect Toad for DB2: ERROR [08001] [IBM] SQL30081N A communication error has been detected. Communication protocol being used: "TCP/IP". Communication API being used: "SOCKETS". Location where the error was detected: "10.99.13.5". Communication function detecting the error: "recv". Protocol specific error code(s): " ", " ", "0". SQLSTATE=08001 Attached is my connection properties. Any help connecting would be great. 回答1: This is tipical problem when

i have installed oracle 64 bit client on my laptop ..toad isn't working ..and is there a utility like SQL*Plus the older version?

拟墨画扇 提交于 2019-12-13 05:12:19
问题 sqlplus command line utility is working fine but i need to copy commands edit them rerun them command prompt is little bit of a hindrance for that matter ..i have downloaded the sql instant client 32 bit and don't know how to proceed further in the installation of it. 回答1: It sounds like your installation of the client is not complete. Uninstall and try installing the oracle client again. As for a gui sqlplus, it is now called sql developer. It can be downloaded here. 来源: https:/