?
Solved

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

Posted on 2008-11-17
5
Medium Priority
?
231 Views
Last Modified: 2012-05-05
Hi

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?

Thanks
0
Comment
Question by:techques
  • 3
  • 2
5 Comments
 
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?
0
 

Author Comment

by:techques
ID: 22981216
Hi

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
0
 
LVL 44

Accepted Solution

by:
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).
0
 

Author Comment

by:techques
ID: 22982040
I use Access 2002
0
 
LVL 44

Expert Comment

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

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