D
DS
Which is better to use? SQL or Queries? Is one faster than the other?
Is one more bullet-proof than another?
Thanks
DS
Is one more bullet-proof than another?
Thanks
DS
Which is better to use? SQL or Queries? Is one faster than the other?
Is one more bullet-proof than another?
Thanks
DS
Thanks Rick. I appreciate the input.Rick said:I believe they are simply different views of the same thing. You can open a
query in SQL view. You can use an SQL as the source for a form or report,
and invoke the query-builder on it.
Typically I try to imbed the query in the record source of my reports and
forms rather than using a saved query. I am not sure if it is any faster,
but it does keep my database window a bit cleaner. The only time I use a
saved query is if it can be used by multiple reports and I don't feel like
copying and pasting it.
Very interesting. So the Query is kinda of a GUI to write SQL!John said:Queries *ARE* SQL.
The query grid is simply a tool to build SQL for you. Every query
exists as a SQL string (and as a not-publicly-documented "compiled
query"); some queries such as UNION or PassThrough queries exist ONLY
as SQL.
You get a bit more flexibility by writing your queries directly in SQL
(parenthesized AND/OR logic for example), and such queries can in fact
be more efficient; but the query grid is still an excellent tool which
I use routinely.
John W. Vinson[MVP]
John,
I thought that the fact that saved queries are saved as "compiled"
query helps to make the query faster. If this is so, then the saved
query would infact be faster than using SQL (as form's recordsource,
combobox's, etc.).
Very interesting. So the Query is kinda
of a GUI to write SQL!