try this: su postgres -c "psql dspace -t -c 'select handle, name from collection, handle where handle.resource_id = collection.collection_id' | sed 's/\s\+| \(.*\)/ \"\1\"/'"
cheers, Jim On Mon, Jun 11, 2007 at 05:11:07PM +0800, Jayan Chirayath Kurian wrote: > Hi! Mika, > > This gives collection id related with a community. I wish to get in the form > 123456789/113 "AMIC Conference" for batch import. I believe 123456789/113 is > the handle id and "AMIC Conference" is the collection name. any help? > > jayan > > -----Original Message----- > From: Mika Stenberg [mailto:[EMAIL PROTECTED] > Sent: Monday, June 11, 2007 5:05 PM > To: Jayan Chirayath Kurian > Cc: dspace-tech@lists.sourceforge.net > Subject: Re: [Dspace-tech] collection id and collection name > > If I understood you correctly, you can try something like this from the > command line: > > su postgres -c "psql dspace -c 'select name, collection_id from > collection;'" > > -Mika > > > Hi! > > > > > > > > Is there a way to find out collection id and collection name from > > postgresql. From dspace-admin we can find this out, but requires > > searching for each collection and corresponding id. Is there an easy way > > to find this for batch importing? > > > > > > > > I searched HANDLE table and COLLECTION table but couldn't succeed. > > > > > > > > Thanks, > > > > Jayan > > > > > > > > > > ------------------------------------------------------------------------ > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > DSpace-tech mailing list > > DSpace-tech@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/dspace-tech > > > -- > Mika Stenberg > IT-asiantuntija > > Terveystieteiden Keskuskirjasto > Lääketieteellinen tdk > PL 61 (Haartmaninkatu 4) > Helsingin Yliopisto > 00290 Helsinki > > puh. +358-9-191 26807 > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > DSpace-tech mailing list > DSpace-tech@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/dspace-tech -- James Rutherford | Hewlett-Packard Limited registered Office: Research Engineer | Cain Road, HP Labs | Bracknell, Bristol, UK | Berks +44 117 312 7066 | RG12 1HN. [EMAIL PROTECTED] | Registered No: 690597 England The contents of this message and any attachments to it are confidential and may be legally privileged. If you have received this message in error, you should delete it from your system immediately and advise the sender. To any recipient of this message within HP, unless otherwise stated you should consider this message and attachments as "HP CONFIDENTIAL". ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech