Hello all, I've been using sql and mysql in particular for several
years now, but I'm having some trouble coming up with a query that
will pull the data that I need from a mysql table without using
multiple queries. Here's what I'm attempting to do:
Table1
column1-a, column2-a, column3-b, column4-b, column5-c, column6-c
in this example, each the table is storing 2 values for one record,
and this had to be done in one table, at the time. I could
re-structure the database, but if there exists a query to fit my needs
I would rather do that.
I need to search the first column in each pair and if it has a
matching value to what I'm searching for pull the second column in the
pair so I can generater a report from that data. I hope this is
enough information for anyone who wishes to make a recommendation. Is
it possible to accomplish this on one query?
Thanks 6 1375
> Hello all, I've been using sql and mysql in particular for several years now, but I'm having some trouble coming up with a query that will pull the data that I need from a mysql table without using multiple queries. Here's what I'm attempting to do:
Table1
column1-a, column2-a, column3-b, column4-b, column5-c, column6-c
in this example, each the table is storing 2 values for one record, and this had to be done in one table, at the time. I could re-structure the database, but if there exists a query to fit my needs I would rather do that.
I need to search the first column in each pair and if it has a matching value to what I'm searching for pull the second column in the pair so I can generater a report from that data. I hope this is enough information for anyone who wishes to make a recommendation. Is it possible to accomplish this on one query?
WHAT?? :) sorry i really don't understand what you want...
is there only one table?
with 6 columns?
what pair???
chris
> Hello all, I've been using sql and mysql in particular for several years now, but I'm having some trouble coming up with a query that will pull the data that I need from a mysql table without using multiple queries. Here's what I'm attempting to do:
Table1
column1-a, column2-a, column3-b, column4-b, column5-c, column6-c
in this example, each the table is storing 2 values for one record, and this had to be done in one table, at the time. I could re-structure the database, but if there exists a query to fit my needs I would rather do that.
I need to search the first column in each pair and if it has a matching value to what I'm searching for pull the second column in the pair so I can generater a report from that data. I hope this is enough information for anyone who wishes to make a recommendation. Is it possible to accomplish this on one query?
WHAT?? :) sorry i really don't understand what you want...
is there only one table?
with 6 columns?
what pair???
chris
> Hello all, I've been using sql and mysql in particular for several years now, but I'm having some trouble coming up with a query that will pull the data that I need from a mysql table without using multiple queries. Here's what I'm attempting to do:
Table1
column1-a, column2-a, column3-b, column4-b, column5-c, column6-c
in this example, each the table is storing 2 values for one record, and this had to be done in one table, at the time. I could re-structure the database, but if there exists a query to fit my needs I would rather do that.
I need to search the first column in each pair and if it has a matching value to what I'm searching for pull the second column in the pair so I can generater a report from that data. I hope this is enough information for anyone who wishes to make a recommendation. Is it possible to accomplish this on one query?
WHAT?? :) sorry i really don't understand what you want...
is there only one table?
with 6 columns?
what pair???
chris
Yeah, I figured that would be confusing.
This is all in one table. In the example I wrote out, there are 6
columns in that table, each divided into corresponding data elements,
this has nothing to do with the database structure itself, just how
the data was organized by the person who created the table.
I need to be able to check through the first of each pair, like you
normally write:
select field_2 from table_name where field_1 = 'data';
where field_1 is the first column of each pair within one row of a
table and field_2 is the second.
My problem is that I don't know if SQL can do this in one statement,
I'm currently accomplishing it with 2 or more depending on the
circumstance, but would like to get it down to one if possible.
Does that help at all?
Thanks for checking this out,
JT
Christian Meisinger <c.*********@livingliquid.com> wrote in message news:<op**************@news.inode.at>... Hello all, I've been using sql and mysql in particular for several years now, but I'm having some trouble coming up with a query that will pull the data that I need from a mysql table without using multiple queries. Here's what I'm attempting to do:
Table1
column1-a, column2-a, column3-b, column4-b, column5-c, column6-c
in this example, each the table is storing 2 values for one record, and this had to be done in one table, at the time. I could re-structure the database, but if there exists a query to fit my needs I would rather do that.
I need to search the first column in each pair and if it has a matching value to what I'm searching for pull the second column in the pair so I can generater a report from that data. I hope this is enough information for anyone who wishes to make a recommendation. Is it possible to accomplish this on one query?
WHAT?? :) sorry i really don't understand what you want... is there only one table? with 6 columns? what pair???
chris
Yeah, I figured that would be confusing.
This is all in one table. In the example I wrote out, there are 6
columns in that table, each divided into corresponding data elements,
this has nothing to do with the database structure itself, just how
the data was organized by the person who created the table.
I need to be able to check through the first of each pair, like you
normally write:
select field_2 from table_name where field_1 = 'data';
where field_1 is the first column of each pair within one row of a
table and field_2 is the second.
My problem is that I don't know if SQL can do this in one statement,
I'm currently accomplishing it with 2 or more depending on the
circumstance, but would like to get it down to one if possible.
Does that help at all?
Thanks for checking this out,
JT
Christian Meisinger <c.*********@livingliquid.com> wrote in message news:<op**************@news.inode.at>... Hello all, I've been using sql and mysql in particular for several years now, but I'm having some trouble coming up with a query that will pull the data that I need from a mysql table without using multiple queries. Here's what I'm attempting to do:
Table1
column1-a, column2-a, column3-b, column4-b, column5-c, column6-c
in this example, each the table is storing 2 values for one record, and this had to be done in one table, at the time. I could re-structure the database, but if there exists a query to fit my needs I would rather do that.
I need to search the first column in each pair and if it has a matching value to what I'm searching for pull the second column in the pair so I can generater a report from that data. I hope this is enough information for anyone who wishes to make a recommendation. Is it possible to accomplish this on one query?
WHAT?? :) sorry i really don't understand what you want... is there only one table? with 6 columns? what pair???
chris
Yeah, I figured that would be confusing.
This is all in one table. In the example I wrote out, there are 6
columns in that table, each divided into corresponding data elements,
this has nothing to do with the database structure itself, just how
the data was organized by the person who created the table.
I need to be able to check through the first of each pair, like you
normally write:
select field_2 from table_name where field_1 = 'data';
where field_1 is the first column of each pair within one row of a
table and field_2 is the second.
My problem is that I don't know if SQL can do this in one statement,
I'm currently accomplishing it with 2 or more depending on the
circumstance, but would like to get it down to one if possible.
Does that help at all?
Thanks for checking this out,
JT
Christian Meisinger <c.*********@livingliquid.com> wrote in message news:<op**************@news.inode.at>... Hello all, I've been using sql and mysql in particular for several years now, but I'm having some trouble coming up with a query that will pull the data that I need from a mysql table without using multiple queries. Here's what I'm attempting to do:
Table1
column1-a, column2-a, column3-b, column4-b, column5-c, column6-c
in this example, each the table is storing 2 values for one record, and this had to be done in one table, at the time. I could re-structure the database, but if there exists a query to fit my needs I would rather do that.
I need to search the first column in each pair and if it has a matching value to what I'm searching for pull the second column in the pair so I can generater a report from that data. I hope this is enough information for anyone who wishes to make a recommendation. Is it possible to accomplish this on one query?
WHAT?? :) sorry i really don't understand what you want... is there only one table? with 6 columns? what pair???
chris This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Irlan agous |
last post by:
$query = "update reactie,form set 'reactie.persemail' = 'form.email' where
'reactie.persid' = 'form.id' AND reactie.persemail='' ";
How can i get this query to work?
Irlan
|
by: |
last post by:
If I need to check if a certain value does exist in a field, and return
either "yes" or "not" which query would be the most effestive?
|
by: paii |
last post by:
I have a table that stores job milestone dates. The 2 milestones I am
interested in are "Ship Date" TypeID 1 and "Revised Ship Date" TypeID 18.
All jobs have TypeID 1 only some jobs have TypeID 18....
|
by: Eagle |
last post by:
Hi all,
This one's drivin' me nuts. Any help would be appreciated. (Access 2000).
I have 3 tables:
tblTools: having the basic data of a tool and a field (txt) showing yes or
no with regard to...
|
by: cover |
last post by:
I have a table with 50 fields that receive input depending on whether
that input came in from a 'shaker' form or a 'conveyor' form. Input
from the 'conveyor' form might populate 25 fields while...
| |
by: faceman28208 |
last post by:
Over the past few years I have consulted on six large projects that all
independently arrived at the same moronic design desision: The use of
SQL query classes.
No, I don't mean a class...
|
by: Chuck36963 |
last post by:
Hi all,
I've been working on a listing problem and I can't figure out how to work it out. I have looked far and wide on the web to find answers, but I'd like other peoples input on my project in...
|
by: Roland Hall |
last post by:
In Access you use "*" + + "*", + can be replaced with &
Calling a parameterized query in Access requires % be used in place of *,
however, all that I have read show dynamic SQL passed to Access:
...
|
by: sara |
last post by:
I am helping a non-profit track their elder clients and care given to
the clients.
The organization would like a report that shows various info on ALL
clients, such as:
# in each town,
# and...
|
by: exipnakias |
last post by:
Hello Guys. In a form I created a listbox which looks up the values of a table.
I want:
1)
..to create a query where a parameter will be needed in order to be loaded.
But I do not want to...
|
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...
| |
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...
|
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...
|
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: 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: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
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...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |