473,880 Members | 1,813 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Convert Access quey to SQL statement

1 New Member
How to convert following MS access quey to SQL server statement

Testx: IIf(Mid(dbo_ITM aster!City,1,2) ="AB",IIf(Mid(d bo_ITMaster!Pla n,1,3)<>"XYZ"," M",IIf(dbo_ITMa ster!Center="11 11", "A", IIf(dbo_ITMaste r!Center="2222" ,"C",IIf(dbo_IT Master!Center=" 3333",IIf(dbo_I TMaster!Zip=234 56,"A","B"),IIf (dbo_ITMaster!S op="ABC","Z"," "))))))

Testx = CASE
WHEN SUBSTRING([ITMaster].[Section],1,2) = 'AB' AND
SUBSTRING([ITMaster].[MastPlanFam],1,3)<>'XYZ' THEN 'M'
WHEN [ITMaster].[center] = '1111' THEN 'A'
WHEN [ITMaster].[center] = '2222' THEN 'C'
WHEN [ITMaster].[center] = '3333' AND
[ITMaster].[Vendor] = 23456 THEN 'A' ELSE 'B'
WHEN [ITMaster].[Sop] = 'ABC' THEN 'Z' ELSE '' END

Aug 14 '08 #1
1 1598
2,878 Recognized Expert Specialist
Looks like you have 2 "ELSE"

-- CK
Aug 14 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

by: ian m via SQLMonster.com | last post by:
Hi, I currently have a ms access update query that runs perfectly well and quicly in access however I now need to add this query to convert this qeryu to oracles equivelant sql syntax and add it to the end of an oracle sql script. Unfortunately Im not having much success although i seem to be able to convert it to a working oracle sql. it takes hours to run the statement in oracle where as in access it runs in seconds
by: Mark B | last post by:
We have an Access app (quite big) at www.orbisoft.com/download. We have had requests by potential users to have it converted to an SQL version for them since there corporate policy excludes them from buying mdb backends. Here's the (million dollar?) questions :) How long and how difficult a process would it be? Which SQL platform would we be best to develop it on?
by: cory | last post by:
Hi, I have an Access database and am having an ASP.NEt application written for it. It is almost complete. I have a hosting company that I signed up with a month ago but before I did anything I asked them if Access and ASP.NET would work on their servers, they said yes so I bought in. Now they are saying my application wont work on their servers using MSaccess and I can only use SQL or asp 3.0. They are saying Microsoft is trying to...
by: Annie D via AccessMonster.com | last post by:
Hi, I am using the following SQL statement courtesy of access monster user: 'Terry Kreft ' to convert dates from a text format (20020331 00:00:00) to a recognised date/time format (31/03/2002). SELECT END_DTTM, Left(,4) AS END_DTTM_year, Mid(,5,2) AS END_DTTM_month,
by: Corey | last post by:
Hello everyone Can anyone help me convert the sql statement below to a statement I can put into Microsoft access, or help me brake this down so I can put it into access. Thanks Corey select 'FOX' PLATFORM
by: groups | last post by:
This is my first foray into writing a generic method and maybe I've bitten off more than I can chew. My intent is to have a generic method that accepts a value name and that value will be returned from the source. My first attempt was as follows; (please ignore that error handling is not present in this example) public T GetValue<T(string objName) { T results;
by: clarencemo | last post by:
Hello all, I have a append query that works great if I just run the query via Access. I need to convert that query into VBA code. Here is the SQL View of the query I'm trying to convert: INSERT INTO TblInitiator IN 'X:\Archive\TestFinal\080107\TS3000v101_be.mdb' SELECT tblAddInitiator.* FROM tblAddInitiator;
by: sebastiany | last post by:
Hi, I currently have a MS Access select query (pretty lengthy) that runs fine in MS Access, however I now need to convert this query to Oracle's equivelant SQL syntax so that I can create a SQL view in Oracle. Any help is appreciated!! Here's the MS Access select query: SELECT TC_PFIZER_T_PROJECT.NUMBER_STRING_UPPER, TC_PFIZER_T_PROJECT.NAME, TC_PFIZER_T_CONTACT.FIRST_NAME, TC_PFIZER_T_CONTACT.NAME,...
by: akshaycjoshi | last post by:
Hi, I am developing one application which requires me to compare date.The dataabse being MS access 2003. When i execute the query in c# it does not show any record ,the date although matches with the date in database. Where is the problem ? The quey executed is select * from finetable where fine_date=#1/9/2008 6:46:36 PM# (The above date is entered by dateTimePicker)
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...
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...
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,...
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...
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();...
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...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
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: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.