Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...My thanks to the contributors who freely share their knowledge and enthusiasms. This forum restores some measure of my faith in human nature..."

Geography

Where in the world do Tek-Tips members come from?
Duke383 (TechnicalUser)
20 May 00 17:56
I had a Oracle database file sent to me in CSV format.  I brought this file into EXCEl and save it as an EXCEL file.  I then imported it into ACCESS using the exiting field names (which were the names in the first row).  I then created a <CFTREE> from the ACCESS database. No real problems.  The field names contained spaces and apostrophes and <CFQUERY> and <CFTREE> seemed to allow this with double quotes and commas in the right place.  The problem I have occurs when I want to use this data to fill out a form.  After I do a <CFQUERY> and then want to <CFSET> a variable to the <CFQUERY> output <CFSET "fieldnames" = qry.field name's> I get an error.  I know one solution is to go to ACCESS and rename all the fields removing spacing and apostrophes.  But if I have to import on a regular basis this is a pain.  Does anyone have a solution for a newbie like me.  James
Helpful Member!  Bromrrrrr (Programmer)
22 May 00 4:51
If the fieldnames themselves wouldn't change, you could alias them as in:

<CFQUERY NAME=qryName" DATASOURCE="dts">
SELECT [First Name] AS FirstName, [Last Name] AS LastName
FROM TabelWithSpaces
</CFQUERY>

In the CFOUTPUT tag you could then just reference the alias
<CFOUTPUT QUERY=qryName>
#FirstName#, #LastName#
</CFOUTPUT>

Hope this helps,

Brommrrrr

Duke383 (TechnicalUser)
22 May 00 12:43
This looks like it could work.  I will definitely try it out.  THANKS!!! James
Duke383 (TechnicalUser)
22 May 00 18:15
Again, THANKS!  The use of aliases work.  James

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close