473,796 Members | 2,737 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PLEASE HELP... SQL SERVER Query in Access

I wrote a bunch of SQL statement in SQL SERVER and now im trying to do
the same thing in access. OMG what a pain that Access can't handle
updates or CAST() the way SQL server can. OK I thought I wrote
everything in Ansi standard SQL statement so it should be compatable?
right?
The problem is i'm going from a relational format to a flat file fomat
and this is only a 15th of the accual query. Please tell me their is a
way to use this type of update query in Access.
UPDATE dbo.GIS_EVENTS_ TEMP
SET FSTHARM1 =
(SELECT MIN(HARMFULEVEN T)
FROM HARMFULEVENT AS A
WHERE ((GIS_EVENTS_TE MP.CASEID =
A.CRASHNUMBER) AND (A.UNITID = 1 AND A.LISTORDER = 0))),

SNDHARM1 =
(SELECT MIN(HARMFULEVEN T)
FROM HARMFULEVENT AS A
WHERE ((GIS_EVENTS_TE MP.CASEID =
A.CRASHNUMBER) AND (A.UNITID = 1 AND A.LISTORDER = 1))),

FSTHARM2 =
(SELECT MIN(HARMFULEVEN T)
FROM HARMFULEVENT AS A
WHERE ((GIS_EVENTS_TE MP.CASEID =
A.CRASHNUMBER) AND (A.UNITID = 2 AND A.LISTORDER = 0))),

SNDHARM2 =
(SELECT MIN(HARMFULEVEN T)
FROM HARMFULEVENT AS A
WHERE ((GIS_EVENTS_TE MP.CASEID =
A.CRASHNUMBER) AND (A.UNITID = 2 AND A.LISTORDER = 1))),

FSTHARM3 =
(SELECT MIN(HARMFULEVEN T)
FROM HARMFULEVENT AS A
WHERE ((GIS_EVENTS_TE MP.CASEID =
A.CRASHNUMBER) AND (A.UNITID = 3 AND A.LISTORDER = 0))),

SNDHARM3 =
(SELECT MIN(HARMFULEVEN T)
FROM HARMFULEVENT AS A
WHERE ((GIS_EVENTS_TE MP.CASEID =
A.CRASHNUMBER) AND (A.UNITID = 3 AND A.LISTORDER = 1)))

Nov 13 '05 #1
5 1575

<me*****@yahoo. com> wrote in
I wrote a bunch of SQL statement in SQL SERVER and now im trying to do
the same thing in access. OMG what a pain that Access can't handle
updates or CAST() the way SQL server can. OK I thought I wrote
everything in Ansi standard SQL statement so it should be compatable?
right?


It _is_ frustrating, isn't it, when we don't do our homework and expect
something to be something that it is not? Most any research at all would
have revealed that Access has its own dialect of SQL, but the same is true
to a greater or lesser extent, of all the "oh-so-standard" server databases.
Who told you that Access was "just a smaller edition of SQL server"? If you
believed them, I have a dull orange bridge over San Francisco Bay that I can
get you a great _deal_ on.

Which approache to using Access with SQL Server are you using? If you are
using an MDB linking tables via ODBC, you can use the Query Builder or use
the Access "flavor" of queries -- the only queries that need be in SQL
understandable by SQL Server are "passthroug h queries". DAPs are another
matter.

There is the neatest Query Builder in Access, that writes SQL for you. I am
not the only one who tends to consider those who begin by writing SQL from
scratch in Access to be "SQL masochists". Then, if you can't quite express
your desires with the visual UI, you can _modify_ the basic SQL that the
Query Builder has constructed.

Larry Linson
Microsoft Access MVP
Nov 13 '05 #2
Lyle Fairfield SM

Nov 13 '05 #3
Oh ...maybe

Lyle Fairfield
Microsoft Access SM

Cool!

Nov 13 '05 #4

<me*****@yahoo. com> wrote in message
news:11******** *************@g 43g2000cwa.goog legroups.com...
I wrote a bunch of SQL statement in SQL SERVER and now im trying to do the same thing in access. OMG what a pain [...]


meyvn77,

But not nearly as painful as multiposting.
Sincerely,

Chris O.
Nov 13 '05 #5
"lylefair" <ly***********@ aim.com> wrote
Oh ...maybe

Lyle Fairfield
Microsoft Access SM

Cool!


Oh, well... we have tried our best to save you from yourself, but it
obviously didn't work. <G,D,&R> On the other hand, perhaps you can start a
cult and get rich... :-)
Nov 13 '05 #6

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

Similar topics

3
3355
by: cooldv | last post by:
i am running a website on Windows 2000 server with ASP 3 webpages and Access 2000 database. (with a hosting company) traffic is slow at this time but expect to grow. lately i have been reading about sql database and sql server, specially this article: http://www.aspfaq.com/show.asp?id=2195 will someone help me understand: 1. with *SQL Server*, do i keep my current Access 2000 database and ASP pages?
4
4241
by: Jason80 | last post by:
First I wrote some _VBScript to get info from OS, and now I wrote some code in VB.Net, and I have a problem now. Look at this script in vbs List1.vbs: strComputer = "."
6
2082
by: mo | last post by:
I need to bring the ssn's into UniqueSups (supervisors) from tblNonNormalized. My inherited DB is not normalized and I find it extremely irritating due to the workarounds needed. I created tblUniqueSups by doing a select Distinct Supervisor Name. Now I need to bring in the SSNs of the Unique Sups but I can't quite get it. I tried: UPDATE UniqueSups LEFT JOIN tblNonNormalized ON UniqueSups.NAME = tblNonNormalized.SupervisorName SET...
2
17762
by: Amanda | last post by:
From a guy in Microsoft newsgroups: | In *comp.databases.ibm-db2* there are always IBM guys | from the Toronto labs on line.Post with the | -for the love of god please help- | line and I'm sure you'll get their attention. | Their usually very good:) So here's my transplanted post ==========================================
8
19603
by: Andrew McNab | last post by:
Hi folks, I have a problem with an MS Access SQL query which is being used in an Access Report, and am wondering if anyone can help. Basically, my query (shown below) gets some records from a couple of tables in my database using INNER JOINS and the WHERE clause to specify the required constraints. However, I also want to read two fields from a *single* record from a table called 'Locations' and then apply one of these field's values...
4
2433
by: Tarun Mistry | last post by:
Hi all, I have posted this in both the c# and asp.net groups as it applies to both (apologies if it breaks some group rules). I am making a web app in asp.net using c#. This is the first fully OO application I will be making, also my first .NET application, so im looking for any help and guidance. Ok, my problems are todo with object and database abstraction, what should i do.
9
2108
by: colin.mcnulty | last post by:
Hi, I'm a SQL Server DBA, but I guess that won't buy me any friends round here huh? ;-) I've been asked to look at the SQL that's being executed on a DB2 database from a web app, specifically when the web site does XYZ, what SQL does it run on the DB2 database? Unfortunately everyone who knew about how it works has left and I've never even seen a DB2 database before today! So, I appear to be looking at an IBM DB2 Universal Database...
4
2201
by: lligogogo | last post by:
Hi, I am new on java function. I created a FORM in asp page, the FORM have three switch. When user selects UPDATE, first thing have to validate is check if this user id is in the control table or not. I think the best way is to check it inside a FUNCTION. I spend two days try to figure out the systax. Now I even doubt if access Sql Server database could be done inside the function or not? Could you please help me? Thank you. What I think the...
3
2396
by: Lester | last post by:
I'm driving myself crazy with a problem in trying to translate a query written for Access to that for SQL server. I would think that I would use a trigger, but am not sure how to set it up. We have a database that manages bookings in four banquet halls. It was running in an Access database, but two years ago, I migrated it to SQL server. In the access database I used VBA to check to ensure no duplicate bookings. I wanted no dup...
0
9685
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
10465
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
10242
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...
1
10200
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9061
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...
0
6800
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5453
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
5582
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4127
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.