[INTERFACES]- SELECT statement

From: Margarita Barvinok <brita(at)math(dot)lsa(dot)umich(dot)edu>
To: pgsql-interfaces(at)postgreSQL(dot)org
Subject: [INTERFACES]- SELECT statement
Date: 1999-02-25 14:26:50
Message-ID: Pine.SOL.3.96-4hack.990224134002.12574D-100000@sewerurchin.math.lsa.umich.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces


Hi,

I have two questions.
1)
How can I realize this query in C-Embedded SQL?

SELECT MAX (score)
FROM report
WHERE uname = 'xxxxxxx'
AND exam_id IN
( SELECT exam_id
FROM exam
WHERE name = 'yyyy'
)

I used DECLARE CURSOR and FETCH for second SELECT statement.
But I don't know how to use WHERE ... IN clause.

2)

I need to create weekly report. I would like to ask users to enter just
one date (for example, Monday of the week).
How can I select information from database for a whole week?

Thank you

-Margarita

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Tom Lane 1999-02-25 15:01:53 Re: [INTERFACES] What's that query limit again?
Previous Message Mark Himsley 1999-02-25 10:05:34 Re: [INTERFACES] What's that query limit again?