473,396 Members | 1,859 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.

Convert the Access query to equilent SQL query with VB as front end

19
IIf(IsNull([Product Hierarchy])=True And IsNull([Types]![Type])=True,"UNKNOWN",IIf(([Types]![Type])="CHECK" And (Left([Unit Ser No],2)="58" Or Left([Unit Ser No],2)="59"),"Residential",IIf(([Types]![Type])="CHECK" And Left([Unit Ser No],2)="56","Commercial",IIf(IsNull([Product Hierarchy])=True Or ([Product Hierarchy])="",[Types]![Type],IIf(IsNull([Types]![Type])=True And IsNull([Hierarchy Type Table]![Type])=True,"UNKNOWN",IIf(IsNull([Hierarchy Type Table]![Type])=True,([Types]![Type]),IIf(IsNull([Hierarchy Type Table]![Type])=False,([Hierarchy Type Table]![Type]),"")))))))


Can anyone help me out in converting this


Thanks in Advance
Aug 1 '07 #1
4 1890
Killer42
8,435 Expert 8TB
I don't get it. Why can't your VB code just continue to use that?

Can you give us more detail about exactly where that comes from? For instance, is that copied from the "Criteria" box in the Access query designer? It would probably be easier if you copied the entire SQL for the query, then just use that.
Aug 1 '07 #2
Killer42
8,435 Expert 8TB
By the way, I'd say all of the "= True" seem somewhat superfluous, wouldn't you?
Aug 1 '07 #3
BSB
19
I have copied it from the criteria of the access query ....
and my table "APR 2007 Warranty Data w/ Adj Cost" has two joins
field one join with "Tbl2"
and field two join with "tbl3"

i hav to write the update query
Aug 2 '07 #4
Killer42
8,435 Expert 8TB
From the sound of it, you probably should ask the SQL experts over in the Access forum about the query. Once you get the SQL worked out, I'm sure we can get it into VB quite simply.
Aug 2 '07 #5

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

Similar topics

4
by: Guy | last post by:
I got a big Access file (1 400 tables) to convert to SQL and I would like to be provided with some automated tools, except upsizing wizard and DTS, to convert it on my own. I got a lot of forms...
29
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...
7
by: Doug Vogel | last post by:
Hi All - I have a client for whom I developed an Access 2000 database. The database is split into 2 files - front-end (forms, queries, reports), and back-end (tables). An .mde file has been...
2
by: Chris Hankey | last post by:
I having a strange and annoying problem where Access crashes when the user copies (to the clipboard) the results of a query. The message is not very helpful. It simply says - "Microsoft Access...
55
by: AnandaSim | last post by:
I just had a google through this NG but have not seen mention of Erik Rucker's blog entry and the new Jet: http://blogs.msdn.com/access/archive/2005/10/05/477549.aspx mentioned by Mike...
11
by: DFS | last post by:
Architecture: Access 2003 client, Oracle 9i repository, no Access security in place, ODBC linked tables. 100 or so users, in 3 or 4 groups (Oracle roles actually): Admins, Updaters and ReadOnly....
2
by: vikram | last post by:
is there any input type=hidden equilent in webform server control? setting textbox visible=flase does not work. thanks
29
by: Jan | last post by:
Hi: I have an Access database that's been running (in one form or another) for a couple of different clients for a few years. Now a new client has requested that it be implemented with a SQL...
8
by: s_wadhwa | last post by:
SELECT DISTINCTROW "01C" AS dummy, Buildings.BuildingNumber, UCASE(Buildings.BuildingName) AS BuildingName, Buildings.MasterPlanCode, Buildings.UniformBuildingCode,...
1
by: Martin Arvidsson | last post by:
Hi! I have done a couple of ComClasses in vb, and from now on i want to code ComClasses in C# is there an equilent of this in c#? If not how to proceed to get the same functionallity to be able...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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...
0
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,...

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.