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

Assistance Required - Syntax.

------=_NextPart_000_002B_01C34DF8.C34C94F0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Assistance required.

I have 3 tables:

TABLE: client_invoice
- client_id *1(show all from client_invoice, only those w/ info from =
client_info)
- invoice_amount
- invoice_date_due

TABLE: client_info
- client_id *1(show all from client_invoice, only those =
w/ info from client_info)
- client_city
- client_state *2(show all from client_info, only those w/ =
match from client_info)
- client_country *3(show all from client_info, only those w/ =
match from client_info)
- apply_tax

TABLE: tax_zones
- tid
- countries_iso_2 *3 (show all from client_info, only those w/ match =
from client_info)
- tax_zone *2(show all from client_info, only those w/ =
match from client_info)
- tax_amount
- tax_desc
- tax_status
(if I was drawing this on paper, or creating it in access, I would join =
based on the *'s above)
Here's the select query, I'm attempting to use....

SELECT client_invoice.client_id, client_invoice.invoice_amount, =
client_invoice.invoice_date_due, client_info.client_city, =
client_info.client_state, client_info.client_country, =
client_info.apply_tax, tax_zones.countries_iso_2, tax_zones.tax_zone, =
tax_zones.tax_amount, tax_zones.tax_desc, tax_zones.tax_status, =
(1-(tax_zones.tax_amount/100)) AS BillRate, =
if(client_info.apply_tax=3D0,(client_invoice.invoi ce_amount-(client_invoi=
ce.invoice_amount*BillRate)),0) AS Amt_taxed FROM tax_zones RIGHT JOIN =
(client_info RIGHT JOIN client_invoice ON =
client_info.client_id=3Dclient_invoice.client_id) ON =
(tax_zones.tax_zone=3Dclient_info.client_state) AND =
(tax_zones.countries_iso_2=3Dclient_info.client_co untry)
I'm getting the following error: You have an error in your SQL syntax =
near '(client_info RIGHT JOIN client_invoice ON =
client_info.client_id=3Dclient_invoice.c'=20
any ideas as to how to fix the syntax of this query? I'm sure it's =
something simple, but I'm still a newbie to MySQL.

Kevin Michael Reed
kr***@tnolnet.com
President
TNOLnet.com

------=_NextPart_000_002B_01C34DF8.C34C94F0--

Jul 19 '05 #1
0 1031

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

Similar topics

0
by: Kevin Michael Reed | last post by:
------=_NextPart_000_002B_01C34DF8.C34C94F0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Assistance required. I have 3 tables:
1
by: Joshua Goodstein | last post by:
I have been working for a month (on and off) on the following issue: The table contains event data, each event is placed in the table as the event occurs, if there is never an event then there is...
2
by: MrMike | last post by:
I have an ASP.NET web form that I'm developing, and I'm running into a problem with my below code. Business rules aside, is there anything noticably wrong with this syntax? This syntax is being...
22
by: Daniel Antonson | last post by:
Fellow programmers, As one of you pointed out, I've been taking 3 online courses (2 are done) and have run into a time crunch. I started these courses in Oct04, but between work (US Army in...
2
by: Dalan | last post by:
I seemed to be having problems with structuring the use of NZ with a DSum expression. Having tried numerous variations of the expression without success, I'm asking for assistance. First some...
4
by: MLH | last post by:
I apologize in advance to forum readers noticing this somewhat redundant post. I fear that my Subject Heading was ill-chosen in earlier post I made on this topic. Am hoping that a clearer Subject...
3
by: Kenny G | last post by:
I have the below listed code in a text box: Private Sub TypeofSurgery_BeforeUpdate(Cancel As Integer) Dim strMsg As String Dim strTitle As String Dim intStyle As Integer If...
1
by: Dalan | last post by:
I'm experiencing a Query Syntax Error with an Access 97 Db. Actually, the query performs as expected when adding any new records or editing existing ones and even deleting records, EXCEPT when the...
3
by: Grayscale | last post by:
Hello, When I execute the code below, I get: "Microsoft JET Database Engine (0x80040E10) No value given for one or more required parameters." error message in the first line. Rs.Open...
6
by: sandy | last post by:
I am working on an assignment which is a 'discrete event simulation'. I have a class called event, I need to add it to a priority queue and I cannot for some reason. I am sure it's the syntax... ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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
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.