473,657 Members | 2,627 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

easiest way to run SQL statments in Access

lee
Newbie question:

I'm looking for the easiest way to run SQL statments in Access. I'm
getting confused by th GUIs - I'm just looking forhow to run SQL on a
table- thanks

Aug 2 '07 #1
2 2386
from the database window, go to the Queries tab and click New. you can use
the query design interface to build a query, or if you're comfortable
writing SQL statements, you can go to the SQL pane from View on the menu bar
(in query Design view), and just write the SQL freehand.

hth
"lee" <go******@world post.comwrote in message
news:11******** **************@ e16g2000pri.goo glegroups.com.. .
Newbie question:

I'm looking for the easiest way to run SQL statments in Access. I'm
getting confused by th GUIs - I'm just looking forhow to run SQL on a
table- thanks

Aug 2 '07 #2
1. Create a new query.
2. In the first dialog, just choose Design view.
3. Cancel the Add Table dialog.
4. Click the View button (left end of toolbar), which defaults to SQL View
(since you added no table.)
5. Type in the SQL Statement you want.
6. Click the Run button on the Toolbar.

If you prefer, you can execute action or DDL queries from a command prompt.
Open the Immediate Window (Ctrl+G), and Execute the query statement, e.g.:
CurrentDb.Execu te "DELETE FROM Table1 WHERE (False);", dbFailOnError

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"lee" <go******@world post.comwrote in message
news:11******** **************@ e16g2000pri.goo glegroups.com.. .
Newbie question:

I'm looking for the easiest way to run SQL statments in Access. I'm
getting confused by th GUIs - I'm just looking forhow to run SQL on a
table- thanks
Aug 2 '07 #3

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

Similar topics

5
1747
by: Angelina | last post by:
Hi, I need some help in writing a 'if-then-else' statement. I currently have wrote one that looks something like this.. If Combobox1 = xxx and textbox1 <> "" then 'run stored procedure 1 to obtain the relevant records and place them in a datagrid. elseif combox1 = yyy and textbox2 <> "" or textbox3 <> "" then
7
2675
by: Dan V. | last post by:
Situation: I have to connect with my Windows 2000 server using VS.NET 2003 and C# and connect to a remote Linux server at another company's office and query their XML file. Their file may be updated every hour or so. How can I do this easily? I would like to use secure communication even encryption if possible. I would query and insert locally only the newest records found in that XML file to an xml or MS access db.
4
1442
by: Jesper | last post by:
Hi, I would like to issue three statements to the database (mysql v4.1) each time the server starts up. Is there any built in way to do this? Like a init file to put them in? At the moment I have a perlscript that starts the server and issues these statements but I have to supply password each time. It feels like there could be a better way of solving this..
4
1672
by: Captain Wonky | last post by:
As the subject says... I'm a database novice even though I've been trying to learn Access for years. I've 'almost finished' several databases but always get stumped on something - this time it's search fields (well, ONE of the things.. ). I'm creating a simple database to track various software licenses on various computers and I'd like to have a 'type and find' search field in a form. I can't seem to find out how to do this. All info...
3
2527
by: R. Hopping | last post by:
What's the easiest way to convert an access form to to a web based Front end ? Is there any software that can convert these formats easily? If not any Beginer tutorials would be helpful. Than you
3
2501
by: Vinny Vinn | last post by:
I have used simple batch statments with C#.for example: string select = "select model from cars where id = ?;select * from trucks where model = ?"; where ? is a parameter whose value i have before running the bach statment. I was wondering if it possible to use the value (model) retuned in the first statement for the where clause in the second statment? TIA, Vinny
5
3100
by: orencs | last post by:
Hello, I am using Microsoft.Practices.EnterpriseLibrary.Data. I am running the following sqlCommand = "SELECT var1 FROM table1 WHERE var2 IN (4,5,6) ; SELECT var3 FROM table2 WHERE var2 IN (4,5,6)"; IDataReader dataReader = db.ExecuteReader(dbCommandWrapper); while
1
1256
by: Syl | last post by:
Hello! Can someone verify this for me please. Should these 2 statments return the same result ? The 2nd one is the original, the first one is my re-write. Thanks : SELECT orders_status, paypalipn_txn . * FROM orders INNER JOIN paypalipn_txn ON item_number = orders_id WHERE customers_id = 4417 ORDER BY date_purchased DESC LIMIT 1
2
1511
by: ramdil | last post by:
Hi All Please help me .Hope i have described my problem clearly below. I have a condition where i need to update some data in table from the value taken from another table.So basically i need to create a update statment to perform the data manipulation.but i am not able to write the update statments.I have two tables..Tab_Bookings and tab_Booking_Fare_Lines .Both are joined by field Booking_ID.Now there is a column No_Passengers in...
0
8392
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8825
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7324
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6163
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4151
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4302
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1611
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.