toad

Different dates Oracle 11g with TOAD

*爱你&永不变心* 提交于 2019-12-13 04:29:30
问题 I have the following queries: SELECT to_date(to_char(to_date('01-FEB-1949'))) FROM DUAL; /*this returns 2/1/2049. */ SELECT to_date(to_char(to_date('01-FEB-1949'),'dd-MON-yyyy')) FROM DUAL; /*this returns 2/1/1949.*/ Why does the first one returns the year 2049 instead of 1949 ? By Googling I have found that I can "force" the client date format to be the one desire by changing the key on the registry: KEY_OraClient11g_home1 NLS_DATE_FORMAT : YYYY/MM/DD 回答1: You're doing multiple implicit date

invalid sql statement in Toad - oracle db

让人想犯罪 __ 提交于 2019-12-13 03:52:29
问题 Below query gets me invalid sql statement in Toad IF EXISTS (SELECT T_BASIS_ACCESS_ID FROM ECKERNEL_MCA.T_BASIS_ACCESS WHERE ROLE_ID LIKE 'MCA.GFS.LEAD') BEGIN SELECT OBJECT_ID, NAME FROM ECKERNEL_MCA.OV_AREA WHERE END_DATE IS NULL AND OBJECT_ID IN (SELECT DISTINCT REPLACE(REPLACE(REPLACE(ATTRIBUTE_TEXT, '(', '' ),')',''), '''', '') FROM ECKERNEL_MCA.T_BASIS_OBJECT_PARTITION WHERE T_BASIS_ACCESS_ID IN (SELECT T_BASIS_ACCESS_ID FROM ECKERNEL_MCA.T_BASIS_ACCESS WHERE ROLE_ID LIKE 'MCA.GFS.LEAD'

Create oracle table with auto commit on

a 夏天 提交于 2019-12-12 14:48:09
问题 Here is the scenario, I am writing a procedure which performs DML(insert,delete) operations on multiple tables. In case of exception I need to rollback data from most of the tables except one. Example: Procedure{ 1 Insert into table1 2 Delete from table2 3 Insert into Table3 4 Insert into table4 Commit; Exception Rollback; } If there is any exception in 4th Insert, I need to rollback all previous transaction except 3rd one. I know, commit/rollback doesn't work like that. But maybe is there

TOAD thinks &String as bind variable

自古美人都是妖i 提交于 2019-12-12 14:31:49
问题 I am developing some ETL with Oracle Data Integrator and sometimes test parts of my code by TOAD. Today I had a problem with TOAD I had a line like AND column_value like('DEV&PROD') when I tried to run the SQL which includes filter above, TOAD ask for the value of PROD, it thought like PROD is a bind or substitution variable. Is there any option in TOAD settings to turn this feature of. I am using bind variable with a column (:), and my data includes & so I need to use it. This code works in

Why am I unable to show Ecplise-Plugin after successfully installed?

爱⌒轻易说出口 提交于 2019-12-12 05:39:14
问题 I am unable to use Eclipse-Plugin after install it into Eclipse IDE. Same thing happen with all Most time with me, while going to install any plugin either it is from MarketPlace or from ZIP . For example, just right now i have installed Toad-Eclipse-Plugin & after installing it while i am going to open it from Window -> Open Perspective -> Other i am unable to show it over there into list. So , finally i am unable to use it. Same scenario i feel before with while installing Maven-Plugin. Can

script that pulls data from a txt file in the where clause

瘦欲@ 提交于 2019-12-12 03:15:17
问题 I am trying to write an sql script in toad for oracle version 9.5 that when run will allow the user to select data from a txt file from the c drive where the parameters / variables are entered. The version of oracle is 10g 回答1: Sounds like an Oracle external directory is perfect for the job. Keep in mind this approach is fraught with difficulties if this is a text file that users can write to. Users will do a hundred things you never believed possible that will cause errors and more. From the

How do I view a CLOB output parameter in TOAD from an Oracle Stored Procedure?

北慕城南 提交于 2019-12-12 00:56:26
问题 I have a stored procedure in a package in an Oracle database that has 2 input parameters + 1 output CLOB parameter. How do I view the output in Toad? (Preferably with the user only having execute/select permissions) Solution: DECLARE my_output_parameter CLOB; BEGIN my_package.my_stored_proc(1, 2, my_output_parameter); DBMS_OUTPUT.PUT_LINE(my_output_parameter); END; Don't forget to execute as script, rather than just execute statement, and results appear in the DBMS Output window, not the

ORACLE: can we create global temp tables or any tables in stored proc?

匆匆过客 提交于 2019-12-11 21:16:46
问题 below is the stored proc I wrote: create or replace procedure test005 as begin CREATE GLOBAL TEMPORARY TABLE TEMP_TRAN ( COL1 NUMBER(9), COL2 VARCHAR2(30), COL3 DATE ) ON COMMIT PRESERVE ROWS / INSERT INTO TEMP_TRAN VALUES(1,'D',sysdate); INSERT INTO TEMP_TRAN VALUES(2,'I',sysdate); INSERT INTO TEMP_TRAN VALUES(3,'s',sysdate); COMMIT; end; when i executed it , i get an error message mentioning: create or replace procedure test005 as begin CREATE GLOBAL TEMPORARY TABLE TEMP_TRAN ( COL1 NUMBER

SQL Alternative to IN operator with variable and between

妖精的绣舞 提交于 2019-12-11 19:23:34
问题 I'm trying to put some variables to an IN Operator but unfortunately it's not working. (found some articles on the internet about it). So what can I do? I have some stacked queries combined to one. But then I have several times the same argument, well that's no problem. But I have to change all the arguments every times I want to make a new search. So to make it easy I used variables at the top of the query so I can't forget even one to change. And that's working also except for the IN

TOAD connects despite the db name not being present in tnsnames.ora

纵然是瞬间 提交于 2019-12-11 18:35:51
问题 I went in TOAD and put in the TNS name for a db that was supplied to me by the DBA. I also put in the user and password and it connected fine. My confusion is that the tnsnames.ora file does not have any entry corresponding to that db name. So how is TOAD resolving the DB name? 回答1: In your Oracle client, the ldap.ora file can list one or more ldap server names, which can be queried to get the Oracle instance info for the given TNS name. This way, TOAD (and other apps) can resolve Oracle