Wrox Home  
Search P2P Archive for: Go

  Return to Index  

sql_language thread: RE: sql_language digest: November 06, 2002


Message #1 by RAJALAKSHMI Balasubramanian <BRajalak@c...> on Wed, 6 Nov 2002 23:03:32 -0500
INFORMATION_SCHEMA is a SQL 92 standard construct.

I guess Oracle doesn't comply...

I'm sorry, but I cannot help you.  Perhaps others who know ORACLE can
answer?

-----Original Message-----
From: RAJALAKSHMI Balasubramanian [mailto:BRajalak@c...]
Sent: Wednesday, November 06, 2002 11:04 PM
To: sql language
Subject: [sql_language] RE: sql_language digest: November 06, 2002


Hi Jeff,
I tried the same with Oracle database but it says that "The table or view"
does not exist.

Can you tell me how this can get executed in Oracle?

Regards,
Raji

> ----------
> From: 	sql language digest[SMTP:sql_language@p...]
> Reply To: 	sql language
> Sent: 	Thursday, November 07, 2002 5:34 AM
> To: 	sql_language digest recipients
> Subject: 	sql_language digest: November 06, 2002
>
> -----------------------------------------------
> When replying to the digest, please quote only
> relevant material, and edit the subject line to
> reflect the message you are replying to.
> -----------------------------------------------
>
> The URL for this list is:
> http://p2p.wrox.com/list.asp?list=sql_language
> SQL_LANGUAGE Digest for Wednesday, November 06, 2002.
>
> 1. Re: field names
> 2. Re: field names
> 3. Re: Finding maximum length of a cell in 'tex't
>       column
>
> ----------------------------------------------------------------------
>
> Subject: Re: field names
> From: "kofi karikari" <kofikarikari@h...>
> Date: Wed, 06 Nov 2002 12:28:49 +0000
> X-Message-Number: 1
>
> Thanks Jeff
> This is perfect. Can I do the same for oracle datebase?
> Cheers
>
>
>
>
>
>
> >From: "Jeff Mason" <je.mason@a...>
> >Reply-To: "sql language" <sql_language@p...>
> >To: "sql language" <sql_language@p...>
> >Subject: [sql_language] Re: field names
> >Date: Tue, 5 Nov 2002 11:50:44 -0500
> >
> >You can use the INFORMATION_SCHEMA.COLUMNS view to retrieve information
> >about the columns in a selected table, e.g.
> >
> >	SELECT Column_name FROM Information_Schema.Columns
> >	WHERE Table_Catalog='Your_database' AND Table_Name='Your_Table'
> >
> >will return a resultset of column names.
> >
> >--
> >Jeff Mason              Custom Apps, Inc.
> >Jeff@c...
> >
> >
> >-----Original Message-----
> >From: kofi karikari [mailto:kofikarikari@h...]
> >Sent: Tuesday, November 05, 2002 11:28 AM
> >To: sql language
> >Subject: [sql_language] Re: field names
> >
> >
> >This works but my concern is if there are millions of records, I will
> have
> >to select all and loop through before I can get the field names.
> >
> >
> > >From: "Nicholas Trevatt" <nicholas@t...>
> > >Reply-To: "sql language" <sql_language@p...>
> > >To: "sql language" <sql_language@p...>
> > >Subject: [sql_language] Re: field names
> > >Date: Tue, 5 Nov 2002 13:59:54
> > >
> > >I can see a couple of ways but here is one just using a standard ADO
> > >Connection object and ADO Recordset.  Make a connection to the data
> > >source, select all fields using a SELECT * and then use the
> > >Recordset.Fields(i).Name and loop through them all.  Here is a quick
> > >example where I used a DataEnvironment to connect to my local SQL
> Server:
> > >
> > >     Dim rs As Recordset
> > >     Dim strSQL As String
> > >     Dim i As Integer
> > >
> > >     strSQL = "SELECT * FROM Contacts"
> > >     DataEnvironment1.conStudMan.Open
> > >     Set rs = DataEnvironment1.conStudMan.Execute(strSQL)
> > >     For i = 0 To rs.Fields.Count - 1
> > >         Debug.Print rs.Fields(i).Name
> > >     Next i
> > >     DataEnvironment1.conStudMan.Close
> > >
> > >Hope this helps.
> > >Nicholas Trevatt
> > >
> > >
> > >How can I programmatically(using VB) select all the field names from
> sql
> > >server table?
> > >
> > >
> > >
> > >
> > >_________________________________________________________________
> > >Protect your PC - get McAfee.com VirusScan Online
> > >http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
> > >
> >
> >
> >_________________________________________________________________
> >Unlimited Internet access for only $21.95/month.  Try MSN!
> >http://resourcecenter.msn.com/access/plans/2monthsfree.asp
> >
> >
> >
> >
> s
>
> _________________________________________________________________
> The new MSN 8: advanced junk mail protection and 2 months FREE*
> http://join.msn.com/?page=features/junkmail
>
>
> ----------------------------------------------------------------------
>
> Subject: Re: field names
> From: Richard Hadfield <Richard.Hadfield@t...>
> Date: Wed, 6 Nov 2002 12:35:26 -0000
> X-Message-Number: 2
>
>
>
> -----Original Message-----
> From: kofi karikari [mailto:kofikarikari@h...]
> Sent: 06 November 2002 12:29
> To: sql language
> Subject: [sql_language] Re: field names
>
>
>
> Not sure think its desc <TableName>
>
> Thanks Jeff
> This is perfect. Can I do the same for oracle datebase?
> Cheers
>
>
>
>
>
>
> >From: "Jeff Mason" <je.mason@a...>
> >Reply-To: "sql language" <sql_language@p...>
> >To: "sql language" <sql_language@p...>
> >Subject: [sql_language] Re: field names
> >Date: Tue, 5 Nov 2002 11:50:44 -0500
> >
> >You can use the INFORMATION_SCHEMA.COLUMNS view to retrieve 
> information
> >about the columns in a selected table, e.g.
> >
> >	SELECT Column_name FROM Information_Schema.Columns
> >	WHERE Table_Catalog=3D'Your_database' AND Table_Name=3D'Your_Table'
> >
> >will return a resultset of column names.
> >
> >--
> >Jeff Mason              Custom Apps, Inc.
> >Jeff@c...
> >
> >
> >-----Original Message-----
> >From: kofi karikari [mailto:kofikarikari@h...]
> >Sent: Tuesday, November 05, 2002 11:28 AM
> >To: sql language
> >Subject: [sql_language] Re: field names
> >
> >
> >This works but my concern is if there are millions of records, I will 
> have
> >to select all and loop through before I can get the field names.
> >
> >
> > >From: "Nicholas Trevatt" <nicholas@t...>
> > >Reply-To: "sql language" <sql_language@p...>
> > >To: "sql language" <sql_language@p...>
> > >Subject: [sql_language] Re: field names
> > >Date: Tue, 5 Nov 2002 13:59:54
> > >
> > >I can see a couple of ways but here is one just using a standard ADO
> > >Connection object and ADO Recordset.  Make a connection to the data
> > >source, select all fields using a SELECT * and then use the
> > >Recordset.Fields(i).Name and loop through them all.  Here is a quick
> > >example where I used a DataEnvironment to connect to my local SQL 
> Server:
> > >
> > >     Dim rs As Recordset
> > >     Dim strSQL As String
> > >     Dim i As Integer
> > >
> > >     strSQL =3D "SELECT * FROM Contacts"
> > >     DataEnvironment1.conStudMan.Open
> > >     Set rs =3D DataEnvironment1.conStudMan.Execute(strSQL)
> > >     For i =3D 0 To rs.Fields.Count - 1
> > >         Debug.Print rs.Fields(i).Name
> > >     Next i
> > >     DataEnvironment1.conStudMan.Close
> > >
> > >Hope this helps.
> > >Nicholas Trevatt
> > >
> > >
> > >How can I programmatically(using VB) select all the field names from 
> sql
> > >server table?
> > >
> > >
> > >
> > >
> > >_________________________________________________________________
> > >Protect your PC - get McAfee.com VirusScan Online
> > >http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3D3963
> > >
> >
> >
> >_________________________________________________________________
> >Unlimited Internet access for only $21.95/month.=A0 Try MSN!
> >http://resourcecenter.msn.com/access/plans/2monthsfree.asp
> >
> >
> >
> >
> s
>
> _________________________________________________________________
> The new MSN 8: advanced junk mail protection and 2 months FREE*
> http://join.msn.com/?page=3Dfeatures/junkmail
>
>
>
>
>
> NOTICE AND DISCLAIMER:
> This email (including attachments) is confidential.  If you have 
> received
> this email in error please notify the sender immediately and delete 
> this
> email from your system without copying or disseminating it or placing 
> any
> reliance upon its contents.  We cannot accept liability for any 
> breaches of
> confidence arising through use of email.  Any opinions expressed in 
> this
> email (including attachments) are those of the author and do not 
> necessarily
> reflect our opinions.  We will not accept responsibility for any 
> commitments
> made by our employees outside the scope of our business.  We do not 
> warrant
> the accuracy or completeness of such information.
>
>
> ----------------------------------------------------------------------
>
> Subject: Re: Finding maximum length of a cell in 'tex't
>       column
> From: "Haslett, Andrew" <andrew.haslett@i...>
> Date: Thu, 7 Nov 2002 09:17:08 +1030
> X-Message-Number: 3
>
> Bloody hell.  You're spot on!
>
> Thanks Phil.
>
> -----Original Message-----
> From: pgtips@m... [mailto:pgtips@m...]
> Sent: Tuesday, 5 November 2002 7:14 PM
> To: sql language
> Subject: [sql_language] Re: Finding maximum length of a cell in 'tex't
> column
>
>
> Hi Andrew,
>
> its DATALENGTH(fieldname) you want.
>
> rgds
> Phil
> >----------------------------------------------
> > Hi guys.
>
> Does anyone know of a way to find the maximum size of entry into a 'text'
> column?
>
> Len() only seems to work on 'normal' data types.
>
> Cheers,
> Andrew
>
> IMPORTANT - PLEASE READ ********************
> This email and any files transmitted with it are confidential and may
> contain information protected by law from disclosure.
> If you have received this message in error, please notify the sender
> immediately and delete this email from your system.
> No warranty is given that this email or files, if attached to this
> email, are free from computer viruses or other defects. They
> are provided on the basis the user assumes all responsibility for
> loss, damage or consequence resulting directly or indirectly from
> their use, whether caused by the negligence of the sender or not.
>
>
>
>
>
>
> ---
>
> END OF DIGEST
>
>



  Return to Index