473,396 Members | 2,089 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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(HARMFULEVENT)
FROM HARMFULEVENT AS A
WHERE ((GIS_EVENTS_TEMP.CASEID =
A.CRASHNUMBER) AND (A.UNITID = 1 AND A.LISTORDER = 0))),

SNDHARM1 =
(SELECT MIN(HARMFULEVENT)
FROM HARMFULEVENT AS A
WHERE ((GIS_EVENTS_TEMP.CASEID =
A.CRASHNUMBER) AND (A.UNITID = 1 AND A.LISTORDER = 1))),

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

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

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

SNDHARM3 =
(SELECT MIN(HARMFULEVENT)
FROM HARMFULEVENT AS A
WHERE ((GIS_EVENTS_TEMP.CASEID =
A.CRASHNUMBER) AND (A.UNITID = 3 AND A.LISTORDER = 1)))

Nov 13 '05 #1
5 1550

<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 "passthrough 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*********************@g43g2000cwa.googlegro ups.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
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...
4
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
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...
2
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...
8
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...
4
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...
9
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...
4
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...
3
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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,...
0
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...
0
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...
0
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...

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.