p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

proasp_codeclinic thread: using whitespace in table names in SQL select statements


Message #1 by "Ken Shaw" <kenprogac@h...> on Wed, 26 Dec 2001 08:01:09
1. never SELECT *
         -list out the field names
         -performance issues

2. use [] around your table/fieldnames

sql = "select [fld1] from [Breast Surgery]"



At 08:01 AM 12/26/2001 +0000, you wrote:
>---
>Need a present for your favorite programmer?
>E-Documents from Amazon.com at http://p2p.wrox.com/edocs.asp
>---
>Hi,
>I'm using this query string
>mySqlQuery = "SELECT * FROM 'Breast Surgery'";
>to access the data in a table called Breast Surgery - with whitespace.
>
>Its throwing an error though, and I don't know why
>
>Can anyone help out?
>
>Cheers,
>
>Ken Sahw
>$subst('Email.Unsub').


Robert Chartier
Author and Developer
xxx-xxx-xxxx
rob@a...
http://www.aspfree.com/devlinks
http://www.aspfree.com/authors/robert
http://www.aspalliance.com/nothingmn
http://www.15seconds.com/issue/wa.htm#chartier


  Return to Index