oracle10g

How to calculate the slope in SQL

大兔子大兔子 提交于 2019-12-08 23:06:02
问题 I have some data in a sql database and I'd like to calculate the slope. The data has this layout: Date | Keyword | Score 2012-01-10 | ipad | 0.12 2012-01-11 | ipad | 0.17 2012-01-12 | ipad | 0.24 2012-01-10 | taco | 0.19 2012-01-11 | taco | 0.34 2012-01-12 | taco | 0.45 I'd like the final output to look like this by creating a new table using SQL: Date | Keyword | Score | Slope 2012-01-10 | ipad | 0.12 | 0.06 2012-01-11 | ipad | 0.17 | 0.06 2012-01-12 | ipad | 0.24 | 0.06 2012-01-10 | taco |

invalid value for parameter, 'directory'

拥有回忆 提交于 2019-12-08 20:35:22
问题 I am trying to import a datadump using impdp utility and who command is as follows: IMPDP project/project DIRECTORY=e:\_workline\workspace\rfc_16012014\project_staging DUMPFILE=project_staging.dmp LOGFILE=project_staging_log.log; But i get this error on running this command: UDI-00014: invalid value for parameter, 'directory' However the value passed to DIRECTORY paramter is correct as in if i paste the given path in i.e. e:\_workline\workspace\rfc_16012014\project_staging in the explorer

ORACLE: NO DATA FOUND — but data exists

坚强是说给别人听的谎言 提交于 2019-12-08 19:32:11
问题 Debugging a package procedure and am getting a no data found when there is in fact data. Testing just the SELECT SELECT trim(trailing '/' from GL_SECURITY) as DUMMY FROM b2k_user@b2k WHERE sms_username = 'FUCHSB'; This happily returns my value : '23706*706' As soon as i try to have this selected INTO i get a NO_DATA _FOUND error (commented out the error handling i put in) set serveroutput on DECLARE p_BAS_user_name varchar2(20); v_gl_inclusion varchar2(1000); v_gl_exclusions varchar2(1000);

convert row into columns in oracle10g

走远了吗. 提交于 2019-12-08 18:02:25
how can i convert rows in to columns in oracle 10g( like pivot in oracle 11g),so that i can add multiple 'and' conditions for the primary key. ex: select emp_name from emp where empid = 1 and emp_age = 21; where empid = 12 and emp_age = 23; without using 'in' ,i have to get records which satisfies all the above condtions(Like 'and ' operation). This blog entry on pivot queries may give you some ideas. There is no easy way to do this in sql. If you know how many columns you need read this: http://thinkoracle.blogspot.com/2005/09/pivot-and-crosstab-queries.html CREATE TABLE CFL (season NUMBER(4)

ORA-29270: too many open HTTP requests

邮差的信 提交于 2019-12-08 17:20:54
问题 Can someone help me with this problem that occurs whenever you run a TRIGGER, but works in a normal PROCEDURE? TRIGGER: create or replace procedure testeHTTP(search varchar2) IS Declare req sys.utl_http.req;<BR> resp sys.utl_http.resp;<BR> url varchar2(500); Begin url := 'http://www.google.com.br'; dbms_output.put_line('abrindo'); -- Abrindo a conexão e iniciando uma requisição req := sys.utl_http.begin_request(search); dbms_output.put_line('preparando'); -- Preparandose para obter as

PLS-00123: program too large (Diana nodes) while trying to compile a package

故事扮演 提交于 2019-12-08 15:31:54
问题 While compiling a package, I ran into an error message: Error: PLS-00123: program too large (Diana nodes) Line: 1 The package in question has about 1k lines (spec) + 13k lines in body. While researching on this, I came across this Ask Tom question When compiling a PL/SQL unit, the compiler builds a parse tree. The maximum size of a PL/SQL unit is determined by the size of the parse tree. A maximum number of diana nodes exists in this tree. Up to 7.3, you could have 2**14 (16K) diana nodes,

unexpected query success

旧城冷巷雨未停 提交于 2019-12-08 15:11:47
问题 SELECT COUNT (*) FROM rps2_workflow WHERE workflow_added > TO_DATE ('01.09.2011', 'dd.mm.yyyy') AND workflow_finished < TO_DATE ('wtf', 'dd.mm.yyyy') AND workflow_status IN (7, 12, 17) AND workflow_worker = 159 I expect this query to fail, because of invalid date, but it returns 0 The plan for this query shows that on 8th step the invalid clause is processed: 8 TABLE ACCESS BY INDEX ROWID TABLE RPS2.RPS2_WORKFLOW Object Instance: 1 Filter Predicates: ("WORKFLOW_STATUS"=7 OR "WORKFLOW_STATUS"

How to monitor all the executed sql statements as a result of single transaction

徘徊边缘 提交于 2019-12-08 11:24:33
问题 I am in the process of upgrading our server from one version to other.So for this purpose i need the detail of all the queries executing in single transaction. I am enabling trace logs for that but that is a tedious process as it contains system related queries also.AWR reports seems to be not working. I am using oracle 10/11 g.Is there any other way in sql developer to achieve this goal. 回答1: Tracing is the only way to see all statements executed. AWR works by sampling active sessions; this

plsql block to get the dynamic sql query result

半城伤御伤魂 提交于 2019-12-08 11:03:14
问题 we have created following anonymous block........... DECLARE sql_str long(32000); where_str long(32000); counter NUMBER(3):=0; BEGIN sql_str:='SELECT '||' A.bio_id ,'; where_str:=' where '||'A.bio_id=B.bio_id AND'||' A.bio_id<>0 and rownum<25 AND (' ; LOOP counter:=counter+1; sql_str:=sql_str||'decode(A.wk_units'||(counter+1)||' - B.wk_units'|| (counter)||',0,NULL,A.wk_units'||(counter+1)||')'; sql_str:=sql_str||', decode(A.wk_units'||(counter+1)||' - B.wk_units'|| (counter)||',0,NULL,B.wk

How can I call Oracle stored procedure which has one out parameter as sysrefcursor using Hibernate?

你离开我真会死。 提交于 2019-12-08 08:35:06
问题 Here is my stored procedure which has one out parameter: create or replace PROCEDURE CITYMST_LIST ( P_CURSOR OUT sys_refcursor ,CMPID IN NUMBER , STSTATUS IN NUMBER ) AS BEGIN OPEN P_CURSOR FOR SELECT * FROM city_master WHERE citycmp_id=CMPID AND city_status=STSTATUS; END CITYMST_LIST; In my hbm configuration I have mapped stored procedure: <sql-query name="CITYMST_LIST" callable="true"> <return class="CityMaster"> </return> { ? = call CITYMST_LIST(?,?) } </sql-query> I have also tried : {