473,395 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Select top 100 from table1 does not work? Is there another syntax?

I tried similar to sql server to get first 100 rows using
"Select top 100 from table1" does not work? Is there another syntax?
Nov 12 '05 #1
3 8636
ga*****@netscape.net wrote in
news:ef**************************@posting.google.c om:
I tried similar to sql server to get first 100 rows using
"Select top 100 from table1" does not work? Is there another syntax?


Select what?

SELECT TOP 100 table1.* from table1 works for me in Access97.

I suspect that the missing field definition is causing you grief.
Bob Q
Nov 12 '05 #2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

If you're using the JET (aka Access) db then try this:

Select top 100 * from table1

You have to indicate which columns (fields) you want. The above
SELECT clause indicates ALL (*) columns.

- --
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBP9kI6IechKqOuFEgEQLG1QCfS6qSs/g6GE7GipW9LZ9dJL++u68AoNXd
Sp/6IfTEMte9UWojmoU2ZpMY
=Hkso
-----END PGP SIGNATURE-----

ga*****@netscape.net wrote:
I tried similar to sql server to get first 100 rows using
"Select top 100 from table1" does not work? Is there another syntax?


Nov 12 '05 #3
Thanks Guys. my mistake
MGFoster <me@privacy.com> wrote in message news:<EN*****************@newsread1.news.pas.earth link.net>...
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

If you're using the JET (aka Access) db then try this:

Select top 100 * from table1

You have to indicate which columns (fields) you want. The above
SELECT clause indicates ALL (*) columns.

- --
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBP9kI6IechKqOuFEgEQLG1QCfS6qSs/g6GE7GipW9LZ9dJL++u68AoNXd
Sp/6IfTEMte9UWojmoU2ZpMY
=Hkso
-----END PGP SIGNATURE-----

ga*****@netscape.net wrote:
I tried similar to sql server to get first 100 rows using
"Select top 100 from table1" does not work? Is there another syntax?

Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Taper Litwater | last post by:
after selecting from two table like so- select table1.column, table2.column from table1, table2 ... What is the correct syntax to access the individual table data? With one table I would...
3
by: John | last post by:
I would like to subtract tow fields in table for example Table1 has fields A, B, C I wrote the statement as follows Select A, B, (A-B) as diff from Table1. MySQL is complaining that there...
1
by: Craig Stadler | last post by:
Can someone help with query syntax regarding IN/EXISTS.. I'm trying to do this: insert into table2 (field1) select field1 from table1 where field1 not in (select field1 from table2) delete...
4
by: 001 | last post by:
Hello, The select statement needs only 1 second to complete the query. But the update statement spends 30 minutes. Why? SELECT STATEMENT: declare @IDate smalldatetime select @IDate=col001...
3
by: Tcs | last post by:
My backend is DB2 on our AS/400. While I do HAVE DB2 PE for my PC, I haven't loaded it yet. I'm still using MS Access. And no, I don't believe this is an Access question. (But who knows? I...
1
by: Alex | last post by:
Hello I need to select records from table1 where column1 is a part of column2 in table2, but with this query I can't obtain the desired result: SELECT * from table1 a, table2 b where b.column2...
48
by: Jimmy | last post by:
thanks to everyone that helped, unfortunately the code samples people gave me don't work. here is what i have so far: <% Dim oConn, oRS, randNum Randomize() randNum = (CInt(1000 * Rnd) + 1) *...
22
by: MP | last post by:
vb6,ado,mdb,win2k i pass the sql string to the .Execute method on the open connection to Table_Name(const) db table fwiw (the connection opened via class wrapper:) msConnString = "Data Source="...
6
by: plaster1 | last post by:
Been trying to come up with a query to filter-down my sample set into distinct records. For instance, lets say column1 is a sample set, column2 is the parameter, and column3 is a name and column4...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.