<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.talis.com/tdn" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>Talis Developer Network - SQL - Comments</title>
 <link>http://www.talis.com/tdn/node/1746</link>
 <description>Comments for &quot;SQL&quot;</description>
 <language>en</language>
<item>
 <title>SQL and MARC records</title>
 <link>http://www.talis.com/tdn/node/1746#comment-568</link>
 <description>&lt;p&gt;I&#039;m not the best person on the MARC21 stuff but here goes. &lt;/p&gt;
&lt;p&gt;The MARC21 record is held in a new table structure and uses blobs (a database data type) that Alto uses to display the record.  However the TalisMARC record is still held in the WORK_SUBFIELD table but there are different rules between the two types of record which requires a conversion process with whole sets of rules.&lt;/p&gt;
&lt;p&gt;The on-line documentation and/or postings to the MARC21 Forum might clarify the exact relationship.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Brian Crampton&lt;br /&gt;
Developer, Talis&lt;/p&gt;
</description>
 <pubDate>Fri, 22 Jun 2007 14:24:08 +0100</pubDate>
 <dc:creator>Brian Crampton</dc:creator>
 <guid isPermaLink="false">comment 568 at http://www.talis.com/tdn</guid>
</item>
<item>
 <title>sql and MARC tags</title>
 <link>http://www.talis.com/tdn/node/1746#comment-567</link>
 <description>&lt;p&gt;Hi Brian&lt;br /&gt;
I was looking at a MARC21 record but I&#039;m confused now. If I&#039;m looking at a MARC21 record that has an 022 field then why didn&#039;t the SQL query find it? Sorry to be such a pain!&lt;/p&gt;
</description>
 <pubDate>Fri, 22 Jun 2007 14:13:11 +0100</pubDate>
 <dc:creator>Julie Hart</dc:creator>
 <guid isPermaLink="false">comment 567 at http://www.talis.com/tdn</guid>
</item>
<item>
 <title>SQL and MARC tags</title>
 <link>http://www.talis.com/tdn/node/1746#comment-566</link>
 <description>&lt;p&gt;Are you looking at a MARC21 record in Alto?&lt;/p&gt;
&lt;p&gt;It&#039;s possible that a work has an 022 field visible on-line when there&#039;s no 022 in WORK_SUBFIELD.  One of the things the conversion from TalisMARC does is to check whether the number in the 001 of the TalisMARC record is an ISBN or ISSN, and if so, it creates the relevant field in the MARC 21 record (020 for ISBN, 022 for ISSN).&lt;/p&gt;
&lt;p&gt;In TalisMARC it was very common to have an ISBN or ISSN as the 001, in which case it wasn&#039;t repeated in another field.  So there would be no 022 field in the TalisMARC record, but there would in the MARC 21 record.&quot;&lt;/p&gt;
&lt;p&gt;Questions about MARC21 conversion can be raised on the &lt;a href=&quot;http://www.talis.com/forums/viewforum.php?f=88 &quot;&gt;MARC21 Forum&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Brian Crampton&lt;br /&gt;
Developer, Talis&lt;/p&gt;
</description>
 <pubDate>Thu, 21 Jun 2007 15:26:01 +0100</pubDate>
 <dc:creator>Brian Crampton</dc:creator>
 <guid isPermaLink="false">comment 566 at http://www.talis.com/tdn</guid>
</item>
<item>
 <title>sql</title>
 <link>http://www.talis.com/tdn/node/1746#comment-564</link>
 <description>&lt;p&gt;When I do select * from WORK_SUBFIELD where WORK_ID=7055 it doesn&#039;t list the 022 field so my original query was correct but when I look at the record on Alto it does have an 022 field. Curiouser and curiouser&lt;/p&gt;
</description>
 <pubDate>Thu, 21 Jun 2007 14:44:42 +0100</pubDate>
 <dc:creator>Julie Hart</dc:creator>
 <guid isPermaLink="false">comment 564 at http://www.talis.com/tdn</guid>
</item>
<item>
 <title>sql</title>
 <link>http://www.talis.com/tdn/node/1746#comment-563</link>
 <description>&lt;p&gt;Thanks Brian&lt;br /&gt;
I&#039;ll do some more investigating.&lt;br /&gt;
Julie&lt;/p&gt;
</description>
 <pubDate>Thu, 21 Jun 2007 14:22:59 +0100</pubDate>
 <dc:creator>Julie Hart</dc:creator>
 <guid isPermaLink="false">comment 563 at http://www.talis.com/tdn</guid>
</item>
<item>
 <title>SQL question</title>
 <link>http://www.talis.com/tdn/node/1746#comment-562</link>
 <description>&lt;p&gt;Just to confirm - you checked the output of isql statement for the control number and WORK_ID directly for those in question? Also how were you checking the suspect works?&lt;/p&gt;
&lt;p&gt;Did you run the SQL with&lt;/p&gt;
&lt;p&gt;&lt;code&gt;and ws.CONTROL_NUMBER like &quot;{number}&quot;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Also have you searched for the work without the join e.g.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;select WORK_ID from WORK_SUBFIELD&lt;br /&gt;
where TAG_NO=022 and WORK_ID=????&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;There could be an issue with the join because of a data condition or something.  The best approach to diagnostic is to break down the query to make it a simple as possible first.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Brian Crampton&lt;br /&gt;
Developer, Talis&lt;/p&gt;
</description>
 <pubDate>Thu, 21 Jun 2007 14:19:36 +0100</pubDate>
 <dc:creator>Brian Crampton</dc:creator>
 <guid isPermaLink="false">comment 562 at http://www.talis.com/tdn</guid>
</item>
<item>
 <title>sql</title>
 <link>http://www.talis.com/tdn/node/1746#comment-561</link>
 <description>&lt;p&gt;Hi Brian&lt;br /&gt;
Yes I&#039;m using isql. What I wanted to do is find journal records that don&#039;t have the 022 field. The only way I could think of to do this was to get a list of control numbers with an 022 field using isql. I then ran a BO report for a list of control numbers with a journals sequence then cross referenced the two lists in Access so that the list from BO didn&#039;t have any records in it from the list produced by isql (with me so far?). I expected therefore that what I would have left is a list of only those records that didn&#039;t have an 022 field but when I checked a few I found that they did. So why the sql query didn&#039;t find them left me baffled.&lt;br /&gt;
The query I used to get the list of control numbers was:&lt;/p&gt;
&lt;p&gt;select ws.WORK_ID, w.WORK_ID, w.CONTROL_NUMBER&lt;br /&gt;
from WORK_SUBFIELD ws, WORKS w&lt;br /&gt;
where TAG_NO=022&lt;br /&gt;
and ws.WORK_ID=w.WORK_ID&lt;/p&gt;
&lt;p&gt;It returned 1500 rows&lt;/p&gt;
</description>
 <pubDate>Thu, 21 Jun 2007 13:51:34 +0100</pubDate>
 <dc:creator>Julie Hart</dc:creator>
 <guid isPermaLink="false">comment 561 at http://www.talis.com/tdn</guid>
</item>
<item>
 <title>SQL question</title>
 <link>http://www.talis.com/tdn/node/1746#comment-560</link>
 <description>&lt;p&gt;That was a long shot but nothing is jumping out that is wrong.&lt;/p&gt;
&lt;p&gt;Are you using isql and not some other tool?&lt;/p&gt;
&lt;p&gt;Also, at the risk of displaying my lack of cataloguing knowledge, why do you think there should be more and how many were you expecting (roughly)?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Brian Crampton&lt;br /&gt;
Developer, Talis&lt;/p&gt;
</description>
 <pubDate>Thu, 21 Jun 2007 13:30:34 +0100</pubDate>
 <dc:creator>Brian Crampton</dc:creator>
 <guid isPermaLink="false">comment 560 at http://www.talis.com/tdn</guid>
</item>
<item>
 <title>sql</title>
 <link>http://www.talis.com/tdn/node/1746#comment-559</link>
 <description>&lt;p&gt;Hi Brian&lt;br /&gt;
No I didn&#039;t have rowcount set. I have just tried the query again on the main server and got 1498&lt;/p&gt;
</description>
 <pubDate>Wed, 20 Jun 2007 16:31:00 +0100</pubDate>
 <dc:creator>Julie Hart</dc:creator>
 <guid isPermaLink="false">comment 559 at http://www.talis.com/tdn</guid>
</item>
<item>
 <title>SQL question</title>
 <link>http://www.talis.com/tdn/node/1746#comment-558</link>
 <description>&lt;p&gt;The SQL looks OK (ignoring the typo of from)&lt;/p&gt;
&lt;p&gt;&lt;code&gt;select count(*)&lt;br /&gt;
from WORK_SUBFIELD&lt;br /&gt;
where TAG_NO=022&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;1500 is a nice round number.  You don&#039;t have a the number of rows returned limited do you?  This can be done by the rowcount command e.g.&lt;/p&gt;
&lt;p&gt;set rowcount 100&lt;br /&gt;
go&lt;/p&gt;
&lt;p&gt;This would only return 100 rows from an SQL statement.  It can be turned off with:&lt;/p&gt;
&lt;p&gt;set rowcount 0&lt;br /&gt;
go&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Brian Crampton&lt;br /&gt;
Developer, Talis&lt;/p&gt;
</description>
 <pubDate>Wed, 20 Jun 2007 16:19:55 +0100</pubDate>
 <dc:creator>Brian Crampton</dc:creator>
 <guid isPermaLink="false">comment 558 at http://www.talis.com/tdn</guid>
</item>
<item>
 <title>SQL</title>
 <link>http://www.talis.com/tdn/node/1746</link>
 <description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I&#039;m trying to count how many records in our database have a TAG_NO=022 by doing:&lt;br /&gt;
select count (*) form WORK_SUBFIELD&lt;br /&gt;
where TAG_NO=022&lt;/p&gt;
&lt;p&gt;I get 1500 but I know there are more than this, any suggestions?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
</description>
 <comments>http://www.talis.com/tdn/node/1746#comments</comments>
 <category domain="http://www.talis.com/tdn/taxonomy/term/54">Miscellaneous</category>
 <pubDate>Wed, 20 Jun 2007 16:03:42 +0100</pubDate>
 <dc:creator>Julie Hart</dc:creator>
 <guid isPermaLink="false">1746 at http://www.talis.com/tdn</guid>
</item>
</channel>
</rss>
