OK Chris. Thanks for the coding advice. I'll specify the column instead. -----Original Message----- From: Peterson, Chris [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 10, 2006 11:16 AM To: CF-Talk Subject: RE: book title listing
And just because nobody else said it: It generally considered bad practice to SELECT * I would change it to SELECT only the column names that you need to return, otherwise you are just pulling needless data from the SQL server. Chris -----Original Message----- From: Orlini, Robert [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 10, 2006 11:06 AM To: CF-Talk Subject: RE: book title listing Hi Aaron, where left(booktitle, 1) = 'A' worked great! Thanks. Robert O. -----Original Message----- From: Aaron Rouse [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 10, 2006 11:01 AM To: CF-Talk Subject: Re: book title listing In Oracle you would use SubStr() Something like SubStr(booktitle, 1, 1,) On 10/10/06, Munson, Jacob <[EMAIL PROTECTED]> wrote: > > What data base are you using? In MS SQL you can use LEFT like so: > where left(booktitle, 1) = 'A' > > This might be the same in the other Databases, not sure. > > > -----Original Message----- > > From: Orlini, Robert [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, October 10, 2006 8:50 AM > > > > I have a menu list of books and would like to have it list > > each title alphabetically BUT only display the listing for one letter. > > > > For instance, the menu page would have A-Z listed and when a > > user clicks on A all the titles with A would list. I realize > > I have to add a where to the statement, but how do I isolate > > the first letter of the book title? > > > > Here is my query: > > > > <cfquery name="Getbook" datasource="printprices"> > > SELECT * FROM bookinfo > > order by booktitle > > </cfquery> > > "EMF <idahopower.com>" made the following annotations. > > ------------------------------------------------------------------------ ------ > This transmission may contain information that is privileged, confidential > and/or exempt from disclosure under applicable law. If you are not the > intended recipient, you are hereby notified that any disclosure, copying, > distribution, or use of the information contained herein (including any > reliance thereon) is STRICTLY PROHIBITED. If you received this transmission > in error, please immediately contact the sender and destroy the material in > its entirety, whether in electronic or hard copy format. Thank you. > > > ======================================================================== ====== > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:256116 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4