Click here to Skip to main content
15,915,501 members
Home / Discussions / Database
   

Database

 
AnswerRe: How to get Cursor's record count (Transact-SQL) ? Pin
Mycroft Holmes30-Aug-11 16:23
professionalMycroft Holmes30-Aug-11 16:23 
AnswerRe: How to get Cursor's record count (Transact-SQL) ? Pin
Shameel31-Aug-11 4:09
professionalShameel31-Aug-11 4:09 
GeneralRe: How to get Cursor's record count (Transact-SQL) ? Pin
Naunt31-Aug-11 16:45
Naunt31-Aug-11 16:45 
GeneralRe: How to get Cursor's record count (Transact-SQL) ? Pin
Mycroft Holmes1-Sep-11 13:01
professionalMycroft Holmes1-Sep-11 13:01 
QuestionIF Condition in cursor definition Pin
csetopper_bhanu29-Aug-11 21:10
csetopper_bhanu29-Aug-11 21:10 
AnswerRe: IF Condition in cursor definition Pin
Mycroft Holmes29-Aug-11 22:35
professionalMycroft Holmes29-Aug-11 22:35 
QuestionHow to combine results in cursor? Pin
SledgeHammer0129-Aug-11 12:53
SledgeHammer0129-Aug-11 12:53 
AnswerRe: How to combine results in cursor? Pin
Mycroft Holmes29-Aug-11 22:40
professionalMycroft Holmes29-Aug-11 22:40 
AnswerRe: How to combine results in cursor? Pin
Ganu Sharma15-Sep-11 21:09
Ganu Sharma15-Sep-11 21:09 
QuestionNeed Oracle Column Names Pin
PDTUM27-Aug-11 11:46
PDTUM27-Aug-11 11:46 
AnswerRe: Need Oracle Column Names Pin
Luc Pattyn27-Aug-11 12:28
sitebuilderLuc Pattyn27-Aug-11 12:28 
GeneralRe: Need Oracle Column Names Pin
PDTUM27-Aug-11 14:56
PDTUM27-Aug-11 14:56 
AnswerRe: Need Oracle Column Names Pin
Luc Pattyn27-Aug-11 15:09
sitebuilderLuc Pattyn27-Aug-11 15:09 
GeneralRe: Need Oracle Column Names Pin
PDTUM28-Aug-11 4:53
PDTUM28-Aug-11 4:53 
AnswerRe: Need Oracle Column Names Pin
Mycroft Holmes27-Aug-11 13:11
professionalMycroft Holmes27-Aug-11 13:11 
GeneralRe: Need Oracle Column Names Pin
PDTUM27-Aug-11 14:54
PDTUM27-Aug-11 14:54 
GeneralRe: Need Oracle Column Names Pin
Mycroft Holmes28-Aug-11 14:43
professionalMycroft Holmes28-Aug-11 14:43 
Not sure if this is relevant anymore but here is the code that gets the tables and views from an oracle database. DBOpsO creates a valid oracle connection and executes a sql string to return a datatable.

C#
StringBuilder sSQL = new StringBuilder();
TableDB oTableDB;
sSQL.AppendLine("select T.owner,T.table_name, NVL (V.HasView, 0)HasView");
sSQL.AppendLine("From SYS.ALL_TABLES T ");
sSQL.AppendLine("left join (select owner,view_name, 1 HasView from SYS.ALL_VIEWS where owner in ('SchemaName1','SchemaName2')) V on upper(V.View_Name) = 'VW' || T.table_name ");
sSQL.AppendFormat("and V.owner = T.owner").AppendLine();
sSQL.AppendFormat("where T.owner in ({0})", sSchema.ToString()).AppendLine();
sSQL.AppendLine("order by table_name");

if (oDBOpsO == null || oDBOpsO.Creds.Database != oDB.DatabaseName)
{
    oDBOpsO = clsMain.GetDBOpsO(oDB.Server.ServerName, oDB.DatabaseName);
}

DataTable dtData = oDBOpsO.GetTableSQL(sSQL.ToString());

TableDB oTable = new TableDB();
List<TableDB> lTbl = new List<TableDB>();
foreach (DataRow orow in dtData.Rows)


Note I have a convention that all views are prefixed with 'vw'
Never underestimate the power of human stupidity
RAH

AnswerRe: Need Oracle Column Names Pin
A.J.Wegierski27-Aug-11 21:34
A.J.Wegierski27-Aug-11 21:34 
AnswerRe: Need Oracle Column Names [modified] Pin
Shameel27-Aug-11 23:28
professionalShameel27-Aug-11 23:28 
GeneralRe: Need Oracle Column Names Pin
PDTUM28-Aug-11 4:48
PDTUM28-Aug-11 4:48 
AnswerRe: Need Oracle Column Names Pin
PIEBALDconsult28-Aug-11 4:44
mvePIEBALDconsult28-Aug-11 4:44 
GeneralRe: Need Oracle Column Names Pin
PDTUM28-Aug-11 4:56
PDTUM28-Aug-11 4:56 
GeneralRe: Need Oracle Column Names Pin
Shameel28-Aug-11 8:33
professionalShameel28-Aug-11 8:33 
GeneralRe: Need Oracle Column Names Pin
PDTUM28-Aug-11 11:39
PDTUM28-Aug-11 11:39 
GeneralRe: Need Oracle Column Names Pin
Shameel28-Aug-11 22:30
professionalShameel28-Aug-11 22:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.