TOP 10 Question 
Author Message
 TOP 10 Question

Hello
I try the top command in a sql string but nothing happens
The string is this
Data1.RecordSource = "SELECT  TOP " & Val(Text1) & " movieID as code, Movie,
Count(Movie) AS Rentals From kinisis where mDate between #" &
Format(DTPicker1.Value, "MM-DD-YYYY") & "# and #" & Format(DTPicker2.Value,
"MM-DD-YYYY") & "# GROUP BY movieID, Movie ORDER BY count(Movie) DESC"

Thanks



Thu, 22 May 2003 03:00:00 GMT  
 TOP 10 Question
Not meaning to ask a dumb question, but you are querying against a Jet
(Access) database correct?  I noticed you are using a Jet syntax for your
dates.

Also, if you remove
     TOP " & Val(Text1) & "
do you get rows returned?  I know, another dumb question, but hey, the TOP
syntax appears correct provided Text1 has a value.


Quote:
> Hello
> I try the top command in a sql string but nothing happens
> The string is this
> Data1.RecordSource = "SELECT  TOP " & Val(Text1) & " movieID as code,
Movie,
> Count(Movie) AS Rentals From kinisis where mDate between #" &
> Format(DTPicker1.Value, "MM-DD-YYYY") & "# and #" &

Format(DTPicker2.Value,
Quote:
> "MM-DD-YYYY") & "# GROUP BY movieID, Movie ORDER BY count(Movie) DESC"

> Thanks



Fri, 23 May 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Top 10 question: masked edit?

2. Numbering the values in a Top 10 query from 1 to 10

3. Top 10 Things CRM is good for?

4. SElECT TOP 10 return 11 records ?

5. Top 10 - Information Systems

6. Top 10 Signs you Need an Information System!

7. Top 10 Signs you Need an Information System!

8. 10 out of 10 to Mr. Doug Robbins - Creating a userform

9. 10 out of 10 to Mr. Doug Robbins - Creating a userform

10. 10 000 = 10 power 4 ?

11. exponentiel 10 000 = 10 ^4 ?

12. columns in a list b 10/10

 

 
Powered by phpBB® Forum Software