If only :-)

Query Of Queries syntax error.
 Encountered "[. Incorrect Select List,  Incorrect select column

Sigh.  The "ORDER BY 3" syntax is working okay, its just a pain to
maintain the mapping in the event the guy changes the order of columns
in the SELECT statement.

I'm considering hollering about the spaces... (it's a new client --
treading carefully...)

--Brendan

On 8/25/05, Mark A Kruger <[EMAIL PROTECTED]> wrote:
> Brendan,
> 
> Does the "select [my column] as NewColumn from queryname"  work?
> 
> If so - you can do 2 queries of a query.  First alias the offending column
> and second to order by. Not pretty - but I'd holler at the guy who wrote the
> SP if I were you :)
> 
> -Mark
> 
> 
> -----Original Message-----
> From: Brendan Baldwin [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 25, 2005 3:11 PM
> To: CF-Talk
> Subject: Re: QoQ Trouble for Column Names with Spaces
> 
> 
> I would love to do that, but the problem is I don't have an "original query"
> -- I retrieving the results from a CFSTOREDPROC and not CFQUERY.
> 
> :-/
> 
> On 8/25/05, Ewok <[EMAIL PROTECTED]> wrote:
> >
> > Give it an alias in your original query that doesn't have spaces.
> >
> > <cfquery datasource="...
> > Select "my column" as mycolumn
> >
> > -----Original Message-----
> > From: Brendan Baldwin [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, August 25, 2005 11:15 AM
> > To: CF-Talk
> > Subject: QoQ Trouble for Column Names with Spaces
> >
> > Hi everyone --
> >
> > I'm working for a client who has given me some Oracle stored procedures
> > which return some fields that have SPACES in the columns returned.
> >
> > I want to apply sorting to the results, so I was going to use a CFQUERY
> > DBTYPE="query" and just ORDER BY selectively--
> >
> > The problem is that I can't seem to reference column names that have
> > spaces
> > in them when doing a QoQ !
> >
> > Anyone know how to reference column names with spaces in a QoQ?
> >
> > I've tried:
> > SELECT * FROM thetable ORDER BY 'my column'
> > SELECT * FROM thetable ORDER BY "my column"
> > SELECT * FROM thetable ORDER BY [my column]
> > SELECT * FROM thetable ORDER BY ['my column']
> >
> > Any other Ideas?
> >
> > --Brendan
> >
> >
> >
> >
> 
> 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:216417
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to