Je suis au niveau 3 avec subjects5
Je dois chercher Museum catalogues dans subject_fr
Cherchons le type de subject_fr
requête : SELECT t.typcategory
FROM pg_attribute a
JOIN pg_type t ON t.oid = a.atttypid
JOIN pg_class c ON c.oid = a.attrelid
JOIN pg_namespace n ON n.oid = c.relnamespace
WHERE c.relname = 'subjects'
AND a.attname = 'subject_fr'
AND a.attnum > 0
AND n.nspname = 'public'subject_fr vaut : S
Je dois chercher Museum catalogues dans subject_en
Cherchons le type de subject_en
requête : SELECT t.typcategory
FROM pg_attribute a
JOIN pg_type t ON t.oid = a.atttypid
JOIN pg_class c ON c.oid = a.attrelid
JOIN pg_namespace n ON n.oid = c.relnamespace
WHERE c.relname = 'subjects'
AND a.attname = 'subject_en'
AND a.attnum > 0
AND n.nspname = 'public'subject_en vaut : S
Je dois chercher Museum catalogues dans subject_fr
Cherchons le type de subject_fr
requête : SELECT t.typcategory
FROM pg_attribute a
JOIN pg_type t ON t.oid = a.atttypid
JOIN pg_class c ON c.oid = a.attrelid
JOIN pg_namespace n ON n.oid = c.relnamespace
WHERE c.relname = 'subjects'
AND a.attname = 'subject_fr'
AND a.attnum > 0
AND n.nspname = 'public'subject_fr vaut : S
Je dois chercher Museum catalogues dans subject_en
Cherchons le type de subject_en
requête : SELECT t.typcategory
FROM pg_attribute a
JOIN pg_type t ON t.oid = a.atttypid
JOIN pg_class c ON c.oid = a.attrelid
JOIN pg_namespace n ON n.oid = c.relnamespace
WHERE c.relname = 'subjects'
AND a.attname = 'subject_en'
AND a.attnum > 0
AND n.nspname = 'public'subject_en vaut : S
Erreur SQL lim :
ERROR: invalid reference to FROM-clause entry for table "subjects"
LINE 1: ... TRUE AND TRUE AND TRUE AND TRUE AND TRUE AND (((subjects.s...
^
HINT: Perhaps you meant to reference the table alias "subjects5".