[Solved] Sql Query Between Different Databases like Oracle and SQL Server in C# [closed]

You will need to install the Oracle Client first. Google “Oracle Database Client windows” to find the download from Oracle’s site. 1) Install the 64-bit package first. (VERY important as there is a bug that messes things up if you install the x86 package first) 2) Change the install path to “C:\oracle\x64” 3) Once installed … Read more

[Solved] Hash Map with key Values – How to get the value using bigdecimal key? [closed]

If I can guess what you might be doing, I came up with this and it is working. Please have a look: import java.math.BigDecimal; import java.util.*; public class MyTest { public static void main(String[] args) { BigDecimal myBigDecimal = new BigDecimal(11); Map<Integer, String> myMap = new HashMap<Integer, String>(); myMap.put(new Integer(11), “Hello World!”); String message = … Read more

[Solved] MySQL Query to Oracle SQL [closed]

All you need to do is remove the < and > characters: SELECT r1.rnr, r1.anaam FROM regisseur r1, regisseur r2 WHERE r2.anaam = ‘input last name director’ AND r1.gdatum < r2.gbdatum Here’s a working demo on SQLFiddle. Presuming you don’t have a good reason to SELECT from regisseur twice, this can be further condensed down … Read more

[Solved] How to do the c# string.split() in oracle

Replace the prefixes you want to remove, then find the index of the first and second underscores and then find the substring between those two separators: Oracle Setup: CREATE TABLE your_table ( value ) AS SELECT ‘DUM_EI_AO_L_5864_Al Meena Tower’ FROM DUAL UNION ALL SELECT ‘EI_AE_L_5864_Al radha Tower’ FROM DUAL Query: SELECT value, SUBSTR( replaced_value, first_separator … Read more

[Solved] Nested SQL statements for Oracle [closed]

You don’t need to nest. You need to join. You’ll probably need something like this, although I would need the exact table structure to be sure. But you’ll get the general idea. select b.TITLE, a.LASTNAME, i.UNITSONHAND from BOOK b inner join AUTHOR a on a.AUTHORID = b.AUTHORID inner join INVENTORY i on i.BOOKID = b.BOOKID … Read more

[Solved] Sql code to create the Mirror image of the string in Oracle sql [closed]

If “mirror” is reversed text use: SELECT REVERSE(‘my_text’) FROM dual; EDIT: SqlFiddleDemo SELECT t ,REVERSE(t) AS Mirror1 ,TRANSLATE(t, ‘abcdefghijklmnopqrstuvwxyz’,N’ɐqɔpǝɟbɥıظʞןɯuodbɹsʇnʌʍxʎz’) AS Mirror2 ,TRANSLATE(REVERSE(t), ‘abcdefghijklmnopqrstuvwxyz’,N’ɐqɔpǝɟbɥıظʞןɯuodbɹsʇnʌʍxʎz’) AS Mirror3 FROM tab; 2 solved Sql code to create the Mirror image of the string in Oracle sql [closed]

[Solved] Error(4,1): PLS-00103: Encountered the symbol “AS”

The error speaks for itself: Error(4,1): PLS-00103: Encountered the symbol “AS” when expecting one of the following: return Remove the AS and define what the function RETURN create or replace FUNCTION BOD_FM_FSCS_A_Data( — Add the parameters for the function here p_ExclusionsOnly NUMBER DEFAULT 0 ) RETURN NUMBER…. Here’s an example from the docs CREATE FUNCTION … Read more

[Solved] can you explain trim and what is doing? [closed]

In simple terms, trim removes whitespace from the beginning or end of a bit of text. For instance, it will turn ‘myvalue ‘ into ‘myvalue’ and ‘ tonsofexteriorwhitespace ‘ into ‘tonsofexteriorwhitespace’. Note that it won’t remove whitespace from the interior of the text though, so ‘ interior spaces remain ‘ becomes ‘interior spaces remain’. It … Read more

[Solved] where clause with date range give strange result

there are many ways of skinning this particular cat, this is just one method. By the way in your example you gave a date of 31st April, this does not exists. SELECT TO_Char(ordered_date,’DD-MON-YYYY’) as ordered_date, order_number, customer_name FROM order_tbl WHERE NVL(:P_ORDER_NUMBER, order_number) = order_number AND ordered_date between NVL(TO_DATE(:P_FROM_DATE,’DD-MON-YYYY’),TO_DATE(’01-MAR-1900′,’DD-MON-YYYY’)) and NVL(to_date(:P_TO_DATE,’DD-MON-YYYY’),TO_DATE(’31-DEC-2100′,’DD-MON-YYYY’)) AND NVL(:P_CUSTOMER_NAME, customer_name) = customer_name … Read more

[Solved] ANYONE CAN TELL ME THAT WHY THIS CODE IS GIVING ME AN ERROR OF TABLE OT CLUSTER KEY WORD IS MISSING? [closed]

It is very clear that you are not creating a dynamic query properly. Space is missing between TABLE’|| C.table_name It must be something like this: EXECUTE IMMEDIATE ‘TRUNCATE TABLE ‘|| C.table_name; — see space after TABLE Cheers!! 3 solved ANYONE CAN TELL ME THAT WHY THIS CODE IS GIVING ME AN ERROR OF TABLE OT … Read more

[Solved] C# Error ORA 00907: Missing Right Parenthesis

This works: CREATE TABLE TBL_TD_USER ( USER_ID INTEGER NOT NULL , USER_NAME VARCHAR2(20) NOT NULL, PASSWORD VARCHAR2(20) NOT NULL, CREATED_BY VARCHAR2(20) NOT NULL, CREATED_DATE DATE NOT NULL, MODIFIED_BY VARCHAR2(20) NOT NULL, MODIFIED_DATE DATE NOT NULL, IS_ACTIVE VARCHAR2(1) NOT NULL, DESCRIPTION VARCHAR2(200) NOT NULL, CONSTRAINT TBL_TD_USER PRIMARY KEY (USER_ID) ); There’s no variable type named CHARACTER … Read more