Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: for help

Re: for help

From: Laya Li <lli_at_sos.state.tx.us>
Date: 19 Jul 2002 06:34:17 -0700
Message-ID: <6fb217d.0207190534.494f9518@posting.google.com>


Hi Pieter,
Thanks for your help. But I want to make sure. Because in oci02.c code(it uses this query) it said, 'This program retrieves the column information for a set of tables called TESTxx where xx is a number.' And in the code it uses this funcation to get tabname value:

/*
 * Function: gentable
 *
 * Description: This routine generates the next table name of the form
TESTxx
 *
 */
void gentable()
{
  tabnum++;                                  /* generate the next
table name */
  sprintf((char *)tabname, "TEST%d", tabnum);

}

if your explain is right( that means this query is just a regular query), this table ocicolu struture should be:

table name : ocicolu
its column names are:
cname clength colid tname

and in column tname, its values are table name test1, test2, test3 etc. Do you think this make sense? I am really confuse by this query. Because in my database, I don't install example database, I cxannot run this code and get its result. So I am cofused by this query and this table.

thank you very much,

LLI "Pieter J.D. Huiberts" <phuiberts-REMOVE_at_ivw.com> wrote in message news:<3D374F9A.7050301_at_ivw.com>...
> cname, clength and colid are column names that you wish to display data for.
>
> ocicolu is the table name that you query against
>
> tname is a column name that you apply criteria for, so that you do not
> get all the rows displyed. tabname seems to be a varable, but in fact is
> the criteria
>
> It really is a pretty simple query, on the face of it.
>
> Query syntax:
> SELECT col1, col2
> FROM table_x
> WHERE col_y = 'criteria';
>
> Laya Li wrote:
>
> >Hi every one,
> >I read a few samples codes of OCI, such as oci04.c oci06.c and
> >oci02.c. I cannot understand the query they used. Here is this query:
> >select cname, clength, colid
> > from ocicolu
> > where tname = tabname;
> >What is ocicolu? Is it a table name? what is tname? In these codes,
> >looks like tabname is argument, so you can use the same query select
> >data from different tables.
> >could anyone explain this query to me?
> >
> >Thanks,
> >
> >LLI
> >
> >
Received on Fri Jul 19 2002 - 08:34:17 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US