This shows you the differences between the selected revision and the current version of the page.
| postgres:postgresql 2010/06/01 11:02 | postgres:postgresql 2010/07/05 15:22 current | ||
|---|---|---|---|
| Line 25: | Line 25: | ||
| <code> | <code> | ||
| ALTER TABLE data ALTER COLUMN filename TYPE character varying(255) USING substring(filename from 20); | ALTER TABLE data ALTER COLUMN filename TYPE character varying(255) USING substring(filename from 20); | ||
| + | </code> | ||
| + | |||
| + | =====Find missing foreign key values===== | ||
| + | <code> | ||
| + | SELECT foo.xcpr FROM (SELECT a.personid AS xcpr, b.personid AS ycpr FROM examinations AS a LEFT OUTER JOIN person AS b ON a.personid = b.personid) AS foo WHERE foo.ycpr IS NULL; | ||
| </code> | </code> | ||