#1 2014-10-13 03:26:26

Feng
Member
Registered: 2013-05-15
Posts: 28

About the way the query parameters

In using a similar method to get MultiFieldValues data, how can directly use similar TSQLMyFile.FirstOne.MyFileDate =? As a condition where a query,
---------------------------------------------------------------------------------------------------------------------------
MultiFieldValues (TSQLMyFile, '*', 'SQLMyFile.FirstOne.MyFileDate =?', [DateTimeToSQL (Now)])


thanks.

Offline

#2 2014-10-13 08:38:35

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,661
Website

Re: About the way the query parameters

You would need a JOINed query, for such search patterns.
MultiFieldValues won't work in this case: it would not create the JOIN, but a regular SELECT on one table.
Did you try to use CreateJoinedAndFillPrepare() instead?

Also consider de-normalizing your data, i.e. copying the FirstOne.MyFieldDate within the main TSQLMyFile table.
This is how you would make it in NoSQL.

I'm afraid you may still think in terms of "pure relational" data layout, whereas you may benefit of a more "document oriented" storage - see "data sharding" or "data sharing" in the SAD pdf.

Offline

Board footer

Powered by FluxBB