[cfaussie] Re: query question

2007-03-04 Thread Peter Tilbrook

For starters column names should NEVER have spaces in them. An
underscore perhaps _ but not spaces. You need to have that
rectified. Dang newbie database designers.

What db are you using (thinking MSAccess or something equally pitiful).

Use CFDUMP var=QueryName for detailed info on your query - requires
MX 7.x or above.

On 05/03/07, skateboard.com.au [EMAIL PROTECTED] wrote:

 Hey Guys

 I have a query object. I do not know the names of the columns so I am
 using the columnlist variable. Some of the column names have spaces in
 them which is causing me some trouble. Can someone point me in the right
 direction on how to escape the space etc etc so I can output the query..

 thanks in advance

 Drew Peacock




 



-- 
Peter Tilbrook
ColdGen Internet Solutions
President, ACT and Region ColdFusion Users Group
PO Box 2247
Queanbeyan, NSW, 2620
AUSTRALIA

http://www.coldgen.com/
http://www.actcfug.com/

Tel: +61-2-6284-2727
Mob: +61-0432-897-437

Email: [EMAIL PROTECTED]
MSN Messenger Live: Desktop General

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: query question

2007-03-04 Thread Ryan Sabir


queryName['column name'][row number] 

Will let you access anything you want.

 -Original Message-
 From: cfaussie@googlegroups.com 
 [mailto:[EMAIL PROTECTED] On Behalf Of skateboard.com.au
 Sent: Monday, 5 March 2007 3:27 PM
 To: cfaussie@googlegroups.com
 Subject: [cfaussie] query question
 
 
 Hey Guys
 
 I have a query object. I do not know the names of the columns 
 so I am using the columnlist variable. Some of the column 
 names have spaces in them which is causing me some trouble. 
 Can someone point me in the right direction on how to escape 
 the space etc etc so I can output the query..
 
 thanks in advance
 
 Drew Peacock
 
 
 
 
  


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: query question

2007-03-04 Thread Dale Fraser

You should be able to access them using the struct method


queryName[column Name]

Regards
Dale Fraser
 
http://dale.fraser.id.au/blog
 

-Original Message-
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Peter Tilbrook
Sent: Monday, 5 March 2007 3:29 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: query question


For starters column names should NEVER have spaces in them. An
underscore perhaps _ but not spaces. You need to have that
rectified. Dang newbie database designers.

What db are you using (thinking MSAccess or something equally pitiful).

Use CFDUMP var=QueryName for detailed info on your query - requires
MX 7.x or above.

On 05/03/07, skateboard.com.au [EMAIL PROTECTED] wrote:

 Hey Guys

 I have a query object. I do not know the names of the columns so I am
 using the columnlist variable. Some of the column names have spaces in
 them which is causing me some trouble. Can someone point me in the right
 direction on how to escape the space etc etc so I can output the query..

 thanks in advance

 Drew Peacock




 



-- 
Peter Tilbrook
ColdGen Internet Solutions
President, ACT and Region ColdFusion Users Group
PO Box 2247
Queanbeyan, NSW, 2620
AUSTRALIA

http://www.coldgen.com/
http://www.actcfug.com/

Tel: +61-2-6284-2727
Mob: +61-0432-897-437

Email: [EMAIL PROTECTED]
MSN Messenger Live: Desktop General





--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: query question

2007-03-04 Thread Leon Seremelis

Even though you shouldn't use spaces in your column names you can
reference them by placing square brackets around the column name.

SELECT [the column] 
FROM Table


-Original Message-
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Peter Tilbrook
Sent: Monday, 5 March 2007 3:29 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: query question


For starters column names should NEVER have spaces in them. An
underscore perhaps _ but not spaces. You need to have that
rectified. Dang newbie database designers.

What db are you using (thinking MSAccess or something equally pitiful).

Use CFDUMP var=QueryName for detailed info on your query - requires
MX 7.x or above.

On 05/03/07, skateboard.com.au [EMAIL PROTECTED] wrote:

 Hey Guys

 I have a query object. I do not know the names of the columns so I am
 using the columnlist variable. Some of the column names have spaces in
 them which is causing me some trouble. Can someone point me in the
right
 direction on how to escape the space etc etc so I can output the
query..

 thanks in advance

 Drew Peacock




 



-- 
Peter Tilbrook
ColdGen Internet Solutions
President, ACT and Region ColdFusion Users Group
PO Box 2247
Queanbeyan, NSW, 2620
AUSTRALIA

http://www.coldgen.com/
http://www.actcfug.com/

Tel: +61-2-6284-2727
Mob: +61-0432-897-437

Email: [EMAIL PROTECTED]
MSN Messenger Live: Desktop General



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: query question

2007-03-04 Thread Dale Fraser

Yes,

Also if you do as then coldfusion will get them with the as name.

SELECT [the column] as theColumn
FROM Table

Regards
Dale Fraser
 
http://dale.fraser.id.au/blog
 

-Original Message-
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Leon Seremelis
Sent: Monday, 5 March 2007 3:34 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: query question


Even though you shouldn't use spaces in your column names you can
reference them by placing square brackets around the column name.

SELECT [the column] 
FROM Table


-Original Message-
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Peter Tilbrook
Sent: Monday, 5 March 2007 3:29 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: query question


For starters column names should NEVER have spaces in them. An
underscore perhaps _ but not spaces. You need to have that
rectified. Dang newbie database designers.

What db are you using (thinking MSAccess or something equally pitiful).

Use CFDUMP var=QueryName for detailed info on your query - requires
MX 7.x or above.

On 05/03/07, skateboard.com.au [EMAIL PROTECTED] wrote:

 Hey Guys

 I have a query object. I do not know the names of the columns so I am
 using the columnlist variable. Some of the column names have spaces in
 them which is causing me some trouble. Can someone point me in the
right
 direction on how to escape the space etc etc so I can output the
query..

 thanks in advance

 Drew Peacock




 



-- 
Peter Tilbrook
ColdGen Internet Solutions
President, ACT and Region ColdFusion Users Group
PO Box 2247
Queanbeyan, NSW, 2620
AUSTRALIA

http://www.coldgen.com/
http://www.actcfug.com/

Tel: +61-2-6284-2727
Mob: +61-0432-897-437

Email: [EMAIL PROTECTED]
MSN Messenger Live: Desktop General







--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: query question

2007-03-04 Thread skateboard.com.au

Hi Peter

Dang newbie database designers

Its a database view, and not something I have ANY control over. I 
understand fully how ugly the concept of spaces in column names is.

What db are you using (thinking MSAccess or something equally pitiful).

SQL Server, not that it has much relevance to my question.

To those that were helful, thanks. I got myself into trouble leaving out 
the row number in the struct syntax. 

cheers

Drew Peacock




-Original Message-
From: Peter Tilbrook [EMAIL PROTECTED]
To: cfaussie@googlegroups.com
Date: Mon, 5 Mar 2007 15:29:24 +1100
Subject: [cfaussie] Re: query question

 
 For starters column names should NEVER have spaces in them. An
 underscore perhaps _ but not spaces. You need to have that
 rectified. Dang newbie database designers.
 
 What db are you using (thinking MSAccess or something equally pitiful).
 
 Use CFDUMP var=QueryName for detailed info on your query - requires
 MX 7.x or above.
 
 On 05/03/07, skateboard.com.au [EMAIL PROTECTED] wrote:
 
  Hey Guys
 
  I have a query object. I do not know the names of the columns so I am
  using the columnlist variable. Some of the column names have spaces
 in
  them which is causing me some trouble. Can someone point me in the
 right
  direction on how to escape the space etc etc so I can output the
 query..
 
  thanks in advance
 
  Drew Peacock
 
 
 
 
  
 
 
 
 -- 
 Peter Tilbrook
 ColdGen Internet Solutions
 President, ACT and Region ColdFusion Users Group
 PO Box 2247
 Queanbeyan, NSW, 2620
 AUSTRALIA
 
 http://www.coldgen.com/
 http://www.actcfug.com/
 
 Tel: +61-2-6284-2727
 Mob: +61-0432-897-437
 
 Email: [EMAIL PROTECTED]
 MSN Messenger Live: Desktop General
 
  



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---