Skip site navigation (1) Skip section navigation (2)

[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 (view raw or flat)
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

pgsql-interfaces by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group