How select statement write on Access view with MSSQL data source?

Posted on 2008-11-17
Medium Priority
Last Modified: 2012-05-05

I created views in MSSQL 2005 express to view tables of a DB. I use ODBC to connect the views in MS ACCESS. I can see the views of those tables set in MSSQL.

However, how should I write the select statement in ACCESS to sort the views in MSSQL?

Question by:techques
  • 3
  • 2
LVL 44

Expert Comment

by:Leigh Purvis
ID: 22977474
A simple select statement will be effectively ANSI standard in both T-SQL and Jet SQL.
(i.e. it should look effectively the same).
SELECT * FROM LinkedViewName
ORDER BY FieldName
Is that what you meant by "sort the views"?
Or are you wanting an ordered list of the Views you have linked to?
Perhaps if you describe the greater objective we can offer a more precise suggestion?

Author Comment

ID: 22981216

I want to make a select statement in ACCESS

select * from table where name = 'abc' order by id desc

As it is an ACCESS view link to DB view, I do not know how can I do it in ACCESS
LVL 44

Accepted Solution

Leigh Purvis earned 150 total points
ID: 22981375
Oh - you mean how to just create a query in Access?
You don't mention a version - in 2007 you'd need to view the Create tab on the ribbon (as I recall :-s) but in previous versions you can choose:
Insert Menu > Query > Design View > View > SQL
Then write your SQL and save the query as whatever name you choose.
That query is then effectively a View (though Access/Jet queries are a sort of limited hybrid between Views and SPs - in that they can be ordered, accept parameters etc).

Author Comment

ID: 22982040
I use Access 2002
LVL 44

Expert Comment

by:Leigh Purvis
ID: 22982076
OK - then as directed above then?

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question