Diapositive PPT
val=0; /* compteur du nombre de tuples */
EXEC SQL WHENEVER NOT FOUND DO
while(dir.arr[i-1]==' ') i--;
printf("%s # ", dir.arr);
while(from.arr[i-1]==' ') i--;
printf("%s # ", from.arr);
while(to.arr[i-1]==' ') i--;
printf("%s \n ", to.arr);
EXEC SQL BEGIN DECLARE SECTION;
char *dbaccess="bda10/bda@T:zazie:o1";
EXEC SQL END DECLARE SECTION;
EXEC SQL DECLARE csa CURSOR FOR
SELECT d.direction, s1.nom_station, s2.nom_station
FROM metro.quais q, metro.stations s1,
metro.stations s2, metro.directions d
WHERE q.ns = s1.ns and q.nss = s2.ns and
ORDER BY d.direction, q.ns;