Oracle

Oracle Dynamic SQL – Drop Table, Copy Table, Purge Tables

Oracle Dynamic SQL – Drop Table, Copy Table, Purge Tables CREATEORREPLACEPROCEDURE COMPLIANCE11.table_drop (table_name VARCHAR2) IS dml_str VARCHAR2 (500); BEGIN dml_str := 'DROP TABLE ' || table_name ; EXECUTEIMMEDIATE dml_str ; END; void the_Table_Housekeeping() { try { string JobDateTime_string = _jobDateTime.ToString("yyyy... JobDateTime_string = JobDateTime_string.Replace(... ""); JobDateTime_string = JobDateTime_string.Replace(... ""); Microsoft_Enterprise_Librar...

Accessing Oracle 9i Stored Procedures Using ADO.NET

Accessing Oracle 9i Stored Procedures Using ADO.NET http://msdn.microsoft.com/e

Oracle - Get Months/Weeks/Days for a Date range, then outer join statistics so that there are no missing Months/Weeks/Days.

Oracle - Get Months/Weeks/Days for a Date range, then outer join statistics so that there are no missing Months/Weeks/Days. I had do produce data so that graphs could be build For a date range By Months/Weeks/Days Where sometimes there are zeroes (gaps) in the data. for whichever Months/Weeks/Days Lets say that you need to graph 4 months of monthly summarized Coupon Data in date range ‘1/18/2007’ to ‘4/12/2007’ for 3 Coupons (A, B, C) from CouponStats in another table that points to Coupons. In order...

Oracle - Select a list of months for a Date Range

Oracle - Select a list of months for a Date Range Case 1 – the 13 months between '10/18/2007' & '11/17/2008' select add_months (trunc (to_date('10/18/2007','MM/D... 'MM'), 1*Level -1) Month FROM Dual CONNECT BY Level <= MONTHS_BETWEEN(to_date('11/... to_date('10/18/2007','MM/DD... + 1 order by month MONTH ---------------------- 1-Oct-2007 1-Nov-2007 1-Dec-2007 1-Jan-2008 1-Feb-2008 1-Mar-2008 1-Apr-2008 1-May-2008 1-Jun-2008 1-Jul-2008 1-Aug-2008 1-Sep-2008 1-Oct-2008...

Oracle Framework for .NET

Option Strict On Option Explicit On Imports Microsoft.VisualBasic Imports System.Data.OracleClient Imports System.Data Imports System.Configuration Imports System Imports System.Web.HttpContext Imports System.Diagnostics Public Class DataAccess Private Shared oConn As New OracleConnection() Private Shared sConnString As String Private _objCommand As OracleCommand Private _objAdaptor As New OracleDataAdapter Dim _strMsg As String = "" Dim _strMsgCode As String = "" Public Function GetDataset(ByVal...

Get weeks from oracle

1) Last 180 days of Monday Starts: with weeks as ( select trunc(sysdate - 180, 'DAY') + 1 - 7 + (P.pivot*7) monday_start from dual D, (select rownum pivot from all_objects where rownum < ((((sysdate - (sysdate - 180)) + 1 ) / 7)) + 2) P order by monday_start ) select * from weeks 2) Weeks for specified data range Public Function Select_Weeks( _ ByVal Start_DateString As String, _ ByVal End_DateString As String, _ ByRef sSql As String) As DataSet Dim returnDs As New DataSet Try 'select 'trunc(to_date('02/2/1980',...

Homework

system/rodvin rodney/rodvin Destination Folder: C:\oraclexe\ Port for 'Oracle Database Listener': 1521 Port for 'Oracle Services for Microsoft Transaction Server': 2030 Port for HTTP Listener: 8080 C:\oraclexe\app\oracle\prod... XE = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = new_rodney)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE) ) ) EXTPROC_CONNECTION_DATA = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY...

AutoNumber And Identity

original articke: http://www.oracle-base.com/... AutoNumber And Identity Functionality Developers who are used to AutoNumber columns in MS Access or Identity columns in SQL Server often complain when they have to manually populate primary key columns using sequences. This type of functionality is easily implemented in Oracle using triggers. First we create a table with a suitable primary key column and a sequence to support it: CREATE TABLE departments ( ID NUMBER(10) NOT NULL,...

ORA-01031: insufficient privileges ; ORA-06512: at "SYS.DBMS_DEBUG_JDWP

Problem: ORA-01031: insufficient privileges ORA-06512: at "SYS.DBMS_DEBUG_JDWP", ORA-06512: at "SYS.DBMS_DEBUG_JDWP_CUSTOM". Solution: On problematic Oracle Server, for User with insufficient privileges , execute command:\ GRANT DEBUG CONNECT SESSION TO <User> Background: SELECT * FROM dba_sys_privs WHERE grantee='<User>' order by privilege SELECT * FROM dba_role_privs WHERE grantee='<User>'...

select single column from Oracle view

to select all column from an Oracle view use asterisk: SELECT * FROM APPIDVND0610.GET_LAST_TWO_C... to select a single column from an Oracle view use double quotes: SELECT "Latest_CloseBid" FROM APPIDVND0610.GET_LAST_TWO_C

Get up and Running with Oracle Express & Visual Studio 2005

Get up and Running with Oracle Express & Visual Studio 2005 1. Install Oracle Express: · Oracle Database 10g Express Edition (Western European) · http://www.oracle.com/techn... 2. Install Oracle Tools for .NET (Oracle Data Access Components (ODAC) for Windows ): http://www.oracle.com/techn... 3. In Visual Studio 2005 a. View -> Oracle Explorer b. Right click “Data Connections” -> Add...

Oracle Developer Tools for Visual Studio .NET with Oracle10g Release 2 ODAC 10.2.0.2.20

Oracle Developer Tools for Visual Studio .NET with Oracle10g Release 2 ODAC 10.2.0.2.20 http://www.oracle.com/techn

Find any datasbase Column by partial Name in any User Table

SQL Server: SELECT sysobjects.name as "Table", syscolumns.name as "Column" from sysobjects , syscolumns where sysobjects.id = syscolumns.id and sysobjects.xtype = 'u' and syscolumns.name like '%YourFieldNameGoesHere%' order by sysobjects.name, syscolumns.name ---------------------------... --Get Table names and Row Counts ---------------------------... SELECT [TableAndCount] = so.name +' - '+CAST(MAX(si.rows)asvarcha... Rows' , [Name] = so.name FROM sysobjects so, sysindexes...