Re: Query By Attribute vs Map NULL values to blank values

2017-10-10 Thread David Adams via 4D_Tech
> I still do not get why the R4 documentation for Query by attribute
discusses how a # query will function if the "Map null
> to blank” checkbox is or is not checked it the checkbox does not exist
for an object field.

John, random thought: Object fields aren't supported in 4D's SQL. So any
SQL-specific features and such are completely meaningless for ojject
fields. And by "not supported" I don't mean ignored. If you do

SELECT * FROM MyTableWithAnObjectField;

4D freaks out because there's an object field. At least as late as R3.

This has come up a few times here and other people have looked at this in
detail. (I think that Jeff Kain, at thel least, has the details.) In my
case, I had to rewrite my ugly little SQL browser to scan the field list
for object fields and remove them from statements. That's okay for my
needs, but I'm not using 4D's SQL for anything real any longer.
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Query By Attribute vs Map NULL values to blank values

2017-10-10 Thread Keisuke Miyako via 4D_Tech
it's probably an omission in the structure editor.

by default the property is on,
but you can change the field type to text or whatever, disable it, and switch 
back to object.

it sounds crazy but it should work.

> 2017/10/10 14:52、John Baughman via 4D_Tech <4d_tech@lists.4D.com> のメール:
>
> I still do not get why the R4 documentation for Query by attribute discusses 
> how a # query will function if the "Map null to blank” checkbox is or is not 
> checked it the checkbox does not exist for an object field.




**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Query By Attribute vs Map NULL values to blank values

2017-10-09 Thread John Baughman via 4D_Tech
Keisuke,

No sure I understand your response.

I am working in R4 and was trying to query on an object field and 
thought I could leave the field undefined using Query By Attribute. Not so, but 
I am content with initializing all the records with an object so the the query 
works with #.

I still do not get why the R4 documentation for Query by attribute 
discusses how a # query will function if the "Map null to blank” checkbox is or 
is not checked it the checkbox does not exist for an object field.

John

> On Oct 9, 2017, at 3:08 PM, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> the "map null to blank" property was originally introduced in v11,
> as a way to tell SQL that pre-existing NULLs
> (which could typically be created by adding fields)
> should not be considered NULLs in SQL.
> otherwise, as far as SQL is concerned,
> NULLs should never be mapped to blanks.
> (that is why the CREATE TABLE command does not allow this property to be 
> enabled)
> 
>> The documentation for Query by Attribute discusses at length how a # query 
>> performs with or without the Map NULL values to blank values checked.
> 
> this passage was added in v16
> 
> http://doc.4d.com/4Dv16R4/4D/16-R4/QUERY-BY-ATTRIBUTE.301-3317528.en.html
> 
> c.f.
> 
> http://doc.4d.com/4Dv15/4D/15/QUERY-BY-ATTRIBUTE.301-2018639.en.html
> 
> and the you immediate notice that "on" is considered the "4D way" and "off" 
> the "SQL way".
> 
> as for the question,
> 
>> I do not see this checkbox  in the field Explorer window for an Object 
>> field. Am I missing something here? It is there for other types of fields 
>> but not Object fields.
> 
> maybe you need to check the version.
> 
> 
> 
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

John Baughman
Kailua, Hawaii
(808) 262-0328
john...@hawaii.rr.com





**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Query By Attribute vs Map NULL values to blank values

2017-10-09 Thread Keisuke Miyako via 4D_Tech
the "map null to blank" property was originally introduced in v11,
as a way to tell SQL that pre-existing NULLs
(which could typically be created by adding fields)
should not be considered NULLs in SQL.
otherwise, as far as SQL is concerned,
NULLs should never be mapped to blanks.
(that is why the CREATE TABLE command does not allow this property to be 
enabled)

> The documentation for Query by Attribute discusses at length how a # query 
> performs with or without the Map NULL values to blank values checked.

this passage was added in v16

http://doc.4d.com/4Dv16R4/4D/16-R4/QUERY-BY-ATTRIBUTE.301-3317528.en.html

c.f.

http://doc.4d.com/4Dv15/4D/15/QUERY-BY-ATTRIBUTE.301-2018639.en.html

and the you immediate notice that "on" is considered the "4D way" and "off" the 
"SQL way".

as for the question,

> I do not see this checkbox  in the field Explorer window for an Object field. 
> Am I missing something here? It is there for other types of fields but not 
> Object fields.

maybe you need to check the version.




**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Query By Attribute vs Map NULL values to blank values

2017-10-08 Thread John Baughman via 4D_Tech
The documentation for Query by Attribute discusses at length how a # query 
performs with or without the Map NULL values to blank values checked.

I do not see this checkbox  in the field Explorer window for an Object field. 
Am I missing something here? It is there for other types of fields but not 
Object fields.

I have added an object field to an existing table. When added the field is 
undefined. At some point I will need to query the using Query By Attribute on 
this field? 

QUERY BY 
ATTRIBUTE([Judges];[Judges]DivRestrictions_1JR_2SR_3Both;"division";#;0)

All the records in the table will be returned I am assuming because the field 
is undefined for all the records. I am assuming that I am going to have to 
prime the records with an object containing “division" = 0. I thought perhaps 
the NULL mapping setting might help me out here, but I do not see anyway to 
change the mapping option for testing.

John




John Baughman
Kailua, Hawaii
(808) 262-0328
john...@hawaii.rr.com





**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**