|
-
Nov 1st, 1999, 09:06 PM
#1
Thread Starter
Junior Member
In my program I wrote the next sentences:
Set NewWS = DBEngine.Workspaces(0)
Set NewDB = NewWS.OpenDatabase(MY.MDB)
TempStr = "select * from MyTable"
Set NewDyn = NewDb.OpenRecordset(TempStr)
How can I sort on one or two fields?
How can I filter some information from a field?
I hope you will give an answere.
Greetings,
Ingrid.
-
Nov 1st, 1999, 09:12 PM
#2
Addicted Member
Sorting
TempStr = "select * from MyTable order by Field1"
Filtering
TempStr = "select * from MyTable where Field1 like 'str*'"
------------------
smalig
[email protected]
smalig.tripod.com
-
Nov 1st, 1999, 09:13 PM
#3
Junior Member
You can user WHERE clause to filter data and ORDER BY to sort data in your SQL statement. Let's say: you want to get the list of all employees from EMPLOYEE whose name starts with A. Your SQL statement will look like:
SELECT * FROM EMPLOYEE
WHERE EMP_NAM LIKE 'A%'
ORDER BY EMP_NAM
HTH!!!
-
Nov 1st, 1999, 09:30 PM
#4
Addicted Member
In ms access LIKE 'A%' not working.
------------------
smalig
[email protected]
smalig.tripod.com
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|