dbTalk Databases Forums  

using 'as' in queries

comp.databases.paradox comp.databases.paradox


Discuss using 'as' in queries in the comp.databases.paradox forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jim Giner
 
Posts: n/a

Default using 'as' in queries - 02-06-2009 , 01:57 PM






Did something change between p5 and p9 as far as what one could use for a
result name in a query field? I have some queries written in p5 where I
checked a field and added "as such_and_such". But when I tried to use the
script containing these queries under p9 so that I could output the table
results to a spreadsheet, the queries won't run. By trial and error I've
determined that p9 doesn't like underscores in the "as (name)" clause.

Comments?



Reply With Quote
  #2  
Old   
Liz McGuire
 
Posts: n/a

Default Re: using 'as' in queries - 02-06-2009 , 02:15 PM







I don't know that it's a change. Underscore has always been the character
used to trigger "make the next word an example element". I suspect your
queries will work if you put quotes around such_and_such:

as "Such_And_Such"

....Perhaps something has changed regarding when the _ is evaluated. In
a QBE, I'm not sure what would happen. In code, underscore is *always* what
represents an example element:

table.db | Field |
Quote:
_join1 |
....so I wouldn't expect underscores without quotes to be treated a anything
but part of an example element.

FWIW,

Liz


"Jim Giner" <jim.giner (AT) suny (DOT) edu> wrote:
Quote:
Did something change between p5 and p9 as far as what one could use for
a
result name in a query field? I have some queries written in p5 where I

checked a field and added "as such_and_such". But when I tried to use the

script containing these queries under p9 so that I could output the table

results to a spreadsheet, the queries won't run. By trial and error I've

determined that p9 doesn't like underscores in the "as (name)" clause.

Comments?




Reply With Quote
  #3  
Old   
Jim Giner
 
Posts: n/a

Default Re: using 'as' in queries - 02-06-2009 , 02:24 PM



You're right - putting them in quotes does let them work in p9. But - in p5
there was no prohibition on using underscores for "as" names - been doing it
for years. This is just the first time I ported a query/script to p9.



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.