dbTalk Databases Forums  

LIST MD = 'NEBULOUS' ]

comp.databases.pick comp.databases.pick


Discuss LIST MD = 'NEBULOUS' ] in the comp.databases.pick forum.



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

Default LIST MD = 'NEBULOUS' ] - 07-18-2006 , 07:19 PM






I didnt notice I'd put the right square bracket outside the quotes in
the above list statement.
It did not produce an error but listed the MD.
Doing...
LIST MD = [ 'NEBULOUS'
results in a 'no items present'.
Trying
LIST MD = NEBULOUS ]
listed the MD.
So why does D3 digest this abberant List statement, but only for the
right square bracket?

Jeremy Thomson


Reply With Quote
  #2  
Old   
Mark Brown
 
Posts: n/a

Default Re: LIST MD = 'NEBULOUS' ] - 07-18-2006 , 08:25 PM






<panzerboy (AT) gmail (DOT) com> wrote

Quote:
I didnt notice I'd put the right square bracket outside the quotes in
the above list statement.
It did not produce an error but listed the MD.
Doing...
LIST MD = [ 'NEBULOUS'
results in a 'no items present'.
Trying
LIST MD = NEBULOUS ]
listed the MD.
So why does D3 digest this abberant List statement, but only for the
right square bracket?

Jeremy Thomson

NEBULOUS] means any string starting with NEBULOUS.

['NEBULOUS' means any string ending with 'NEBULOUS'

What's the problem? Nothing in the MD ending in quote-NEBULOUS-quote?

Mark Brown





Reply With Quote
  #3  
Old   
AT
 
Posts: n/a

Default Re: LIST MD = 'NEBULOUS' ] - 07-18-2006 , 10:04 PM




Mark Brown wrote:
Quote:
panzerboy (AT) gmail (DOT) com> wrote in message
[...]

NEBULOUS] means any string starting with NEBULOUS.

['NEBULOUS' means any string ending with 'NEBULOUS'

What's the problem? Nothing in the MD ending in quote-NEBULOUS-quote?

Mark Brown
Putting the right square bracket after the quoted item was a typo that
suprised me in that it listed the MD. To my way of thinking the parser
should have tokenised 'NEBULOUS' then complained that the ] is
unexpected. But no it took it fine.
There is no 'NEBULOUS' in the MD,...
:LIST MD = '[NEBULOUS]'
[401] no items present.

Doing the list properly (brackets inside the quotes).
:LIST MD = '[NEBULOUS'
[401] no items present.
:LIST MD = 'NEBULOUS]'
[401] no items present.

Doing the list inproperly with the brackets outside the quotes
:LIST MD = ['NEBULOUS'
[401] no items present.
:LIST MD = 'NEBULOUS']
Page 1 MD

MD...............

dos.bridge
MENUS
a
select
print-filter
off
CRS
lptr
....

So whats special about the right square bracket?
I'm guessing the parser treats the ] as second item id to match to, but
again, why not the left square bracket as well?

:LIST MD = 'NEBULOUS'[
[401] no items present.
:LIST MD = ]'NEBULOUS'
Page 1 MD

MD...............

dos.bridge
MENUS
a
select
print-filter
off
CRS

Its just one of the quirky things you encounter in Pick from time to
time that makes me wonder ... WHY?
I'll bet this is a 'feature' unique to D3.

Jeremy Thomson



Reply With Quote
  #4  
Old   
Ed Sheehan
 
Posts: n/a

Default Re: LIST MD = 'NEBULOUS' ] - 07-18-2006 , 10:15 PM



Last I checked, single quotes override everything and look for the single
item NEBULOUS explicitly. Try double quote marks.

Ed

<panzerboy (AT) gmail (DOT) com> wrote

Quote:
Mark Brown wrote:
panzerboy (AT) gmail (DOT) com> wrote in message
[...]

NEBULOUS] means any string starting with NEBULOUS.

['NEBULOUS' means any string ending with 'NEBULOUS'

What's the problem? Nothing in the MD ending in quote-NEBULOUS-quote?

Mark Brown
Putting the right square bracket after the quoted item was a typo that
suprised me in that it listed the MD. To my way of thinking the parser
should have tokenised 'NEBULOUS' then complained that the ] is
unexpected. But no it took it fine.
There is no 'NEBULOUS' in the MD,...
:LIST MD = '[NEBULOUS]'
[401] no items present.

Doing the list properly (brackets inside the quotes).
:LIST MD = '[NEBULOUS'
[401] no items present.
:LIST MD = 'NEBULOUS]'
[401] no items present.

Doing the list inproperly with the brackets outside the quotes
:LIST MD = ['NEBULOUS'
[401] no items present.
:LIST MD = 'NEBULOUS']
Page 1 MD

MD...............

dos.bridge
MENUS
a
select
print-filter
off
CRS
lptr
...

So whats special about the right square bracket?
I'm guessing the parser treats the ] as second item id to match to, but
again, why not the left square bracket as well?

:LIST MD = 'NEBULOUS'[
[401] no items present.
:LIST MD = ]'NEBULOUS'
Page 1 MD

MD...............

dos.bridge
MENUS
a
select
print-filter
off
CRS

Its just one of the quirky things you encounter in Pick from time to
time that makes me wonder ... WHY?
I'll bet this is a 'feature' unique to D3.

Jeremy Thomson




Reply With Quote
  #5  
Old   
Dale
 
Posts: n/a

Default Re: LIST MD = 'NEBULOUS' ] - 07-18-2006 , 10:24 PM



The most likely scenario is that you where asking the AQL processot to:
1. list the md item "nebulous"
2. list the md ending with anything

Think of your query more like:

list md = 'nebulous' "]"

With AQL not always needing quotes, this last statement is most likely what
happened.

Now, can anybody clearly explain the difference of using single quotes and
double quotes in an AQL statement??

Best regards,

Dale


<panzerboy (AT) gmail (DOT) com> wrote

Quote:
I didnt notice I'd put the right square bracket outside the quotes in
the above list statement.
It did not produce an error but listed the MD.
Doing...
LIST MD = [ 'NEBULOUS'
results in a 'no items present'.
Trying
LIST MD = NEBULOUS ]
listed the MD.
So why does D3 digest this abberant List statement, but only for the
right square bracket?

Jeremy Thomson




Reply With Quote
  #6  
Old   
Tom Phillips
 
Posts: n/a

Default Re: LIST MD = 'NEBULOUS' ] - 07-18-2006 , 10:30 PM



From the D3 reference manual:
"The single quotes that would ordinarily be required around the specific
item-ids are no longer required, provided that there is no ambiguities in
the AQL sentence."
It sure looks like an ambiguity that should be reported to RD.

<panzerboy (AT) gmail (DOT) com> wrote

Quote:
I didnt notice I'd put the right square bracket outside the quotes in
the above list statement.
It did not produce an error but listed the MD.
Doing...
LIST MD = [ 'NEBULOUS'
results in a 'no items present'.
Trying
LIST MD = NEBULOUS ]
listed the MD.
So why does D3 digest this abberant List statement, but only for the
right square bracket?

Jeremy Thomson




Reply With Quote
  #7  
Old   
Peter McMurray
 
Posts: n/a

Default Re: LIST MD = 'NEBULOUS' ] - 07-18-2006 , 10:51 PM




"Dale" <benedictknowspam (AT) silk (DOT) net> wrote

Quote:
Now, can anybody clearly explain the difference of using single quotes and
double quotes in an AQL statement??
HI
Single quotes indicate an ID double quotes indicate a value required. I
think that the differentiation vanished with AP in the late 1980's. However
if you want to get ID 1 from a file that has a default dictionary of 1,
2,3.... ( a very valuable feature when used properly for default lists.
Please do not use it as 1 = attribute 7, 2 = attribute 13 etc as you will
confuse everbody) then you will still need to show LIST FILENAME '1'

Peter McMurray




Reply With Quote
  #8  
Old   
BobJ
 
Posts: n/a

Default Re: LIST MD = 'NEBULOUS' ] - 07-19-2006 , 02:17 AM



You might need to quote the quote.
BobJ
"Peter McMurray" <excalibur21 (AT) bigpond (DOT) com> wrote

Quote:
"Dale" <benedictknowspam (AT) silk (DOT) net> wrote in message
news:12br9for2u9ef2d (AT) corp (DOT) supernews.com...
Now, can anybody clearly explain the difference of using single quotes
and double quotes in an AQL statement??
HI
Single quotes indicate an ID double quotes indicate a value required. I
think that the differentiation vanished with AP in the late 1980's.
However if you want to get ID 1 from a file that has a default dictionary
of 1, 2,3.... ( a very valuable feature when used properly for default
lists. Please do not use it as 1 = attribute 7, 2 = attribute 13 etc as
you will confuse everbody) then you will still need to show LIST FILENAME
'1'

Peter McMurray




Reply With Quote
  #9  
Old   
Tony Gravagno
 
Posts: n/a

Default Re: LIST MD = 'NEBULOUS' ] - 07-20-2006 , 05:51 PM



panzerboy (AT) gmail (DOT) com wrote:

Quote:
I didnt notice I'd put the right square bracket outside the quotes in
the above list statement.
It did not produce an error but listed the MD.
Doing...
LIST MD = [ 'NEBULOUS'
results in a 'no items present'.
Trying
LIST MD = NEBULOUS ]
listed the MD.
So why does D3 digest this abberant List statement, but only for the
right square bracket?

Jeremy Thomson
Reporting this to RD won't do any good. You'll be asking for a "fix"
for unsupported syntax. Trust me, that sort of request goes nowhere.
Right Mark?

Anyway, there is a solution to this mystery.

Did you really have a space before and after those brackets? That
could have made a huge difference in the processing. In reality it
doesn't as we'll see below. This is the way this "could" have been
interpreted.
LIST MD = [ 'NEBULOUS'
The bracket means: List items beginning with anything and having
nothing after that. Well, that matches all items.
Since the OR clause is implied, the text in single quotes adds "also
include the item 'NEBULOUS'". Since that item was included by the
left bracket, there is no change to the result set.
LIST MD = NEBULOUS ]
This should return the same dataset. The word NEBULOUS is first
checked against items in the MD to see if it's an ADI, if not it's
considered an item ID. Assuming the item doesn't exist this can be
ignored.
The bracket says "find items that begin with nothing but have anything
following that. Again, this matches all items.

That said, for D3, the extra space and even the single quotes are
ignored, as we'll see in a moment.

Regarding these:
LIST MD = ['NEBULOUS'
LIST MD = 'NEBULOUS']
LIST MD = 'NEBULOUS'[
LIST MD = ]'NEBULOUS'
Use the "Y" option to get some insight into how AQL works:
LIST MD = ['NEBULOUS' (Y
This results in the message:
[2391] Assumed '[' is an item-id, or modifies the item-id.
The same message displays for each variation and confirms that the
space and brackets are not processed separately at all but are treated
the same as they would be if all characters are together an in quotes.

Regarding the results:

For these two statements it's now obvious why we get "no items" for
results:
LIST MD = ['NEBULOUS'
LIST MD = 'NEBULOUS']

For the following I think I can explain why they behave as they do:
LIST MD = 'NEBULOUS'[
LIST MD = ]'NEBULOUS'

The first "'x'[" is invalid syntax. It's converted to 'x[' and can be
translated as "find items beginning with 'x' and anything else, and
ending with a null." This returns no items.

The second "]'x'" is also invalid. As above, the bracket modifies the
ID that comes _before_ it. Since that ID is null, we get "= '['"
which as indicated further above will return all items. Also, the
close bracket is a trailing wild card, so as the parser progresses
through the query it's reasonable that when it sees a close bracket
that it assumes that wildcard should be applied to the preceding ID,
which was null. To confirm this, use they Y option again:
LIST MD = ]'NEBULOUS'
It displays these codes as an indication of what it's looking for:
I'04]^'04NEBULOUS_
The text after the "'04" is a selection criterion. Multiple criteria
are separated with attribute marks. Note the first criterion here is
"]" and "'04NEBULOUS" is the _second_ value. Again, this query
returns all items:
LIST MD = "]"


Mystery solved?

Tony
Nebulous^h^h^ha R&D





Reply With Quote
  #10  
Old   
Peter McMurray
 
Posts: n/a

Default Re: LIST MD = 'NEBULOUS' ] - 07-21-2006 , 02:33 AM



Hi
I am not sure what you mean Bob
Peter McMurray
"BobJ" <bob (AT) wildblue (DOT) net> wrote

Quote:
You might need to quote the quote.
BobJ
"Peter McMurray" <excalibur21 (AT) bigpond (DOT) com> wrote in message
news:0%hvg.7407$tE5.2523 (AT) news-server (DOT) bigpond.net.au...

"Dale" <benedictknowspam (AT) silk (DOT) net> wrote in message
news:12br9for2u9ef2d (AT) corp (DOT) supernews.com...
Now, can anybody clearly explain the difference of using single quotes
and double quotes in an AQL statement??
HI
Single quotes indicate an ID double quotes indicate a value required. I
think that the differentiation vanished with AP in the late 1980's.
However if you want to get ID 1 from a file that has a default dictionary
of 1, 2,3.... ( a very valuable feature when used properly for default
lists. Please do not use it as 1 = attribute 7, 2 = attribute 13 etc as
you will confuse everbody) then you will still need to show LIST FILENAME
'1'

Peter McMurray






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.