/* * public List<string> directGrab(string column, string table) * { * string sqlSelect = "SELECT " + column + " FROM " + table + ";"; * List<string> output = oCObject.generalSqlCommand(sqlSelect); * return output; * } * * public List<string> quickSelect(List<string> columns , string table) * { * string sqlSelect = "SELECT "; * for (int i=0; i < (columns.Count-1); i++) * { * sqlSelect += columns[i] + ", "; * } * sqlSelect += columns[(columns.Count - 1)] + " FROM " + table + ";"; * * List<string> output = oCObject.generalSqlCommand(sqlSelect); * return output; * } */ public void listTables(OCObject oC) { Console.WriteLine("Tables:"); string owner = "C##GHAY"; string tableSQL1 = "SELECT owner FROM all_tables WHERE owner IN ('" + owner + "')"; string tableSQL2 = "SELECT table_name FROM all_tables WHERE owner IN ('" + owner + "')"; List <string> testResults1 = oC.generalSqlCommand(tableSQL1); List <string> testResults2 = oC.generalSqlCommand(tableSQL2); for (int i = 0; i < testResults1.Count; i++) { Console.WriteLine(testResults1[i] + "/" + testResults2[i]); } }
public void sqlChoice(OCObject oC) { Console.Write("Type Test SQL funct (w/o ;): "); string testSql = Console.ReadLine(); List <string> testResults = oC.generalSqlCommand(testSql); foreach (string tt in testResults) { Console.WriteLine("Test result: " + tt.ToString()); } }