Wilfried Mestdagh a écrit :
Hi Guillaume,
if restricting in the where clause on VehicleID, then you should create
an index on VehicleID.
I' not sure I understeand correct. Does this mean that if I uses 'where'
clauses it is not needed to make indexes and it make index itself when
needed ?
N
Hi Guillaume,
> if restricting in the where clause on VehicleID, then you should create
> an index on VehicleID.
I' not sure I understeand correct. Does this mean that if I uses 'where'
clauses it is not needed to make indexes and it make index itself when
needed ?
By now I have made an index on
>Is this the right way to do or is there a better way ?
In addition to the comments others have made, I would suggest you use:
'select count(*) from tx where VehicleID = ' + QuotedStr(VehicleID)
'count(*)' is a special case for the count function that returns "count of
records".
In terms of p
Wilfried Mestdagh wrote:
>
> Hi Arjen,
>
> AM> No, they will probably not all do the same internally: the result
> AM> may be the same, but the "virtual machine" that runs the SQL statements
> AM> will very probably do different things - this depends on optimisation
> AM> and so on. But for most
Wilfried Mestdagh a écrit :
AM> No, they will probably not all do the same internally: the result
AM> may be the same, but the "virtual machine" that runs the SQL statements
AM> will very probably do different things - this depends on optimisation
AM> and so on. But for most of us it is mainly th
Hi Arjen,
AM> No, they will probably not all do the same internally: the result
AM> may be the same, but the "virtual machine" that runs the SQL statements
AM> will very probably do different things - this depends on optimisation
AM> and so on. But for most of us it is mainly the result that count
Wilfried Mestdagh wrote:
>
> Hi Guillaume and Martin,
>
> Thanks for quick responce. Studying the count() function if I use the
> method of Guillaume I dont need the 'where' clause:
>
> 'select count(VehicleID) from tx'
>
> But I assume all 3 methods will do internal exact the same. Result is
Hi Guillaume and Martin,
Thanks for quick responce. Studying the count() function if I use the
method of Guillaume I dont need the 'where' clause:
'select count(VehicleID) from tx'
But I assume all 3 methods will do internal exact the same. Result is
also 1 field with the count in it.
---
Mvg
Wilfried Mestdagh a écrit :
Hello,
I want to have only the count of records for a particular 'where
clause', need no fields. It works using null as argument:
'select null from tx where VehicleID = ' + QuotedStr(VehicleID)
Is this the right way to do or is there a better way ?
Hi Wilfried,
Hello Wilfried,
your query will have as many result - Rows as meet your where-clause.
A Better way will be
select count(*) from tx where VehicleID = ' + QuotedStr(VehicleID)
This will have one result row with the number of records in the first
(and only) column.
Martin
Wilfried Mestdagh sch
Hello,
I want to have only the count of records for a particular 'where
clause', need no fields. It works using null as argument:
'select null from tx where VehicleID = ' + QuotedStr(VehicleID)
Is this the right way to do or is there a better way ?
---
Mvg, Wilfried
http://www.mestdagh.biz
11 matches
Mail list logo