Advertisement

08.01.2007 at 02:08PM PDT, ID: 22735965
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.0

SQL ho to retrieve multiple records form table1 linked to table 2

Asked by samassrl in Informix Database, SQL Query Syntax

Tags: , , , ,

Hi experts,
I have 2 tables
one is made of
id
values
docid
reference

the other one has several fields
...
serial
...
reference in table 1 is linked to serial in table 2
now I need to retrieve the field value in table 1 where docid=1 and docid=2
I need to have something like:
[field1].....[fieldn] from table 2 + [value1], [value2] where value 1 and value2 are the fields in table 1 with docid=1 and docid=2 and reference=serial
is it possible to do it in one sql statement?
Please let me know if it is not clear enough


PS this is the real sql I am executing
SELECT s_pazienti.data, pazienti.nominativo, pazienti.sesso,pazienti. telefono, pazienti.usl, pazienti.cartella, datidoc_car.valore, pazienti.reparto
FROM datidoc_car LEFT JOIN (a_pazienti INNER JOIN (pazienti INNER JOIN s_pazienti ON
pazienti.seriale = s_pazienti.codice) ON
a_pazienti.seriale = pazienti.codice) ON
datidoc_car.riferimento = pazienti.seriale
WHERE ( s_pazienti.servizio=18 )
AND ( datidoc_car.codice=23 )
AND ( pazienti.tipo in ('D','H') )
AND ( pazienti.stato='A' )
group by 8,7,5,6,4,3,2,1
order by reparto, valore DESC, s_pazienti.data

in the same query I need to retrieve datidoc_car.valore for datidoc_car.codice=8

thanks
SamassrlStart Free Trial
[+][-]08.01.2007 at 02:20PM PDT, ID: 19612983

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.01.2007 at 02:27PM PDT, ID: 19613017

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.02.2007 at 02:12PM PDT, ID: 19620929

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.12.2008 at 03:21PM PDT, ID: 22464386

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]09.17.2008 at 08:19PM PDT, ID: 22506868

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Informix Database, SQL Query Syntax
Tags: multiple, sql, retrieve, records, from
Sign Up Now!
Solution Provided By: Computer101
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32