<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>The Kat</title>
		<link>http://thekatswork.ucoz.com/</link>
		<description>Blog</description>
		<lastBuildDate>Wed, 10 Oct 2012 16:48:07 GMT</lastBuildDate>
		<generator>uCoz Web-Service</generator>
		<atom:link href="https://thekatswork.ucoz.com/blog/rss" rel="self" type="application/rss+xml" />
		
		<item>
			<title>Make fixed length delimited string into multiple rows in oracle.</title>
			<description>&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:WordDocument&gt;
 &lt;w:View&gt;Normal&lt;/w:View&gt;
 &lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
 &lt;w:DoNotOptimizeForBrowser/&gt;
 &lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;span style=&quot;font-size:12.0pt;font-family:&quot;Times New Roman&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;mso-ansi-language:EN-GB;mso-fareast-language:
EN-US;mso-bidi-language:AR-SA&quot;&gt;Again something i struggled with myself and
found no help with online.&lt;br&gt;
&lt;br&gt;
We will need to use a clever little function in oracles bag of tricks, the
hierarchical query. &lt;br&gt;
&lt;br&gt;
Hierarchical queries allow you to create a query on a table where the query
will link back to the same table any number of times. I wont go too in depth
about these themselves as their are some quite good webpages explaining them
that are easily found on google. &lt;br&gt;
&lt;br&gt;
How do these queries allow you to change a delimited column into multiple rows?
Well we are miss using the function really, it is not truly intended for this
use but the function lends it self very nicely to this situation.&lt;br&gt;
&lt;br&gt;
There are plenty of examples on oracles forums (if you can pick through them)
of using this type of query to great effect on character delimited strings. On
implementing against actual data and adapting to a fixed length rather than
delimited i found a lot of problems. Effectively once we took the examples
beyond one concatenated string. The results became geometric, growing by a
factor of the original row number with every iteration. So an initial sample of
3 rows with delimited columns would give 9 rows after just 3 iterations. &lt;br&gt;
&lt;br&gt;
The solution was quite simple, as we have fixed length data (in my case 366
sets of 2 characters,) instead of using the actual data in the hierarchical
query we can simply use the hierarchical query to create a table to which we
link our data. this table will hold sufficient information to allow a simple
select to filter the data to what we need.&lt;br&gt;
&lt;br&gt;
For example.&lt;br&gt;
&lt;br&gt;
select &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x.id,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x.startDate,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x.startDate + (p.position - 1) as
att_date,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; substr(x.delimedString, (p.position * 2) -
1, 2) as val,&lt;br&gt;
from&amp;nbsp;&amp;nbsp; table1 x,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (select rownum as position&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from&amp;nbsp;&amp;nbsp; dual&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; connect by level &lt; 366) p&lt;br&gt;
where p.position &lt;= (length(x.delimedString) / 2)&lt;/span&gt;&lt;br&gt;&lt;br&gt;As you can see we have made every row in table1 into 365 rows. These rows will contain all of the information plus a rownum value. We use this rownum value in the select clause, to make each val value different. So the row with position 1 will take the first 2 charecters. The row with position as 3 will take the 5th and 6th numbers.&lt;br&gt;&lt;br&gt;</description>
			<content:encoded>&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:WordDocument&gt;
 &lt;w:View&gt;Normal&lt;/w:View&gt;
 &lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
 &lt;w:DoNotOptimizeForBrowser/&gt;
 &lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;span style=&quot;font-size:12.0pt;font-family:&quot;Times New Roman&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;mso-ansi-language:EN-GB;mso-fareast-language:
EN-US;mso-bidi-language:AR-SA&quot;&gt;Again something i struggled with myself and
found no help with online.&lt;br&gt;
&lt;br&gt;
We will need to use a clever little function in oracles bag of tricks, the
hierarchical query. &lt;br&gt;
&lt;br&gt;
Hierarchical queries allow you to create a query on a table where the query
will link back to the same table any number of times. I wont go too in depth
about these themselves as their are some quite good webpages explaining them
that are easily found on google. &lt;br&gt;
&lt;br&gt;
How do these queries allow you to change a delimited column into multiple rows?
Well we are miss using the function really, it is not truly intended for this
use but the function lends it self very nicely to this situation.&lt;br&gt;
&lt;br&gt;
There are plenty of examples on oracles forums (if you can pick through them)
of using this type of query to great effect on character delimited strings. On
implementing against actual data and adapting to a fixed length rather than
delimited i found a lot of problems. Effectively once we took the examples
beyond one concatenated string. The results became geometric, growing by a
factor of the original row number with every iteration. So an initial sample of
3 rows with delimited columns would give 9 rows after just 3 iterations. &lt;br&gt;
&lt;br&gt;
The solution was quite simple, as we have fixed length data (in my case 366
sets of 2 characters,) instead of using the actual data in the hierarchical
query we can simply use the hierarchical query to create a table to which we
link our data. this table will hold sufficient information to allow a simple
select to filter the data to what we need.&lt;br&gt;
&lt;br&gt;
For example.&lt;br&gt;
&lt;br&gt;
select &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x.id,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x.startDate,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x.startDate + (p.position - 1) as
att_date,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; substr(x.delimedString, (p.position * 2) -
1, 2) as val,&lt;br&gt;
from&amp;nbsp;&amp;nbsp; table1 x,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (select rownum as position&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from&amp;nbsp;&amp;nbsp; dual&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; connect by level &lt; 366) p&lt;br&gt;
where p.position &lt;= (length(x.delimedString) / 2)&lt;/span&gt;&lt;br&gt;&lt;br&gt;As you can see we have made every row in table1 into 365 rows. These rows will contain all of the information plus a rownum value. We use this rownum value in the select clause, to make each val value different. So the row with position 1 will take the first 2 charecters. The row with position as 3 will take the 5th and 6th numbers.&lt;br&gt;&lt;br&gt;</content:encoded>
			<link>https://thekatswork.ucoz.com/blog/make_fixed_length_delimited_string_into_multiple_rows_in_oracle/2012-10-10-42</link>
			<dc:creator>The_Kat</dc:creator>
			<guid>https://thekatswork.ucoz.com/blog/make_fixed_length_delimited_string_into_multiple_rows_in_oracle/2012-10-10-42</guid>
			<pubDate>Wed, 10 Oct 2012 16:48:07 GMT</pubDate>
		</item>
		<item>
			<title>SQL Start and Enddate filter.</title>
			<description>I&apos;ve been working on a particularly poorly designed third party system. In this system child records have a start date and an end date.&lt;br&gt;&lt;br&gt;The system has a flaw in which while allowing one to many links from parent to child records (needed for history), the business logic does not impose the required behaviour. For instance there can be more than one open (null end date) child record when only one should be permitted and all child records can be closed (non null end date) when a child record should only be closed on the creation of a new open record.&lt;br&gt;&lt;br&gt;The reports that I have been tasked with creating therefore required a new filter type on these child records.&lt;br&gt;&lt;br&gt;The filter was needed to return only the open child record with the latest start date or if there is no open child records the record with the latest end date.&lt;br&gt;&lt;br&gt;To do this I split the situation. Firstly we want only the most recent open records. This is fairly simple.&lt;br&gt;&lt;br&gt;(Select * from Child where enddate is null) as a&lt;br&gt;Inner join&lt;br&gt;(Select id, max(startdate) as startdate from Child where enddate is null group by id) as b&lt;br&gt;on a.id = b.id and a.startdate = b.startdate&lt;br&gt;&lt;br&gt;Next we want the most recent end date again fairly simple using the method above.&lt;br&gt;&lt;br&gt;&amp;nbsp;(Select * from Child where enddate is not null) as a&lt;br&gt;Inner join&lt;br&gt;(Select id, max(enddate) as enddate from Child where enddate is not null group by id) as b&lt;br&gt;on a.id = b.id and a. enddate = b. enddate&lt;br&gt;&lt;br&gt;We can than make a union of these that will almost solve our problem.&lt;br&gt;&lt;br&gt;Select x.* from (&lt;br&gt;(Select * from Child where enddate is null) as a&lt;br&gt;Inner join&lt;br&gt;(Select id, max(startdate) as startdate from Child where enddate is null group by id) as b&lt;br&gt;on a.id = b.id and a.startdate = b.startdate&lt;br&gt;) as x&lt;br&gt;&lt;br&gt;union&lt;br&gt;select y.* from (&lt;br&gt;&lt;br&gt;(Select * from Child where enddate is not null) as a&lt;br&gt;Inner join&lt;br&gt;(Select id, max(enddate) as enddate from Child where enddate is not null group by id) as b&lt;br&gt;on a.id = b.id and a. enddate = b. enddate&lt;br&gt;) as y&lt;br&gt;&lt;br&gt;I say almost as their will still be 2 records where open and ended child records are present. So we must apply the conditional filter I detailed in my previous post. The script becoming.&lt;br&gt;&lt;br&gt;Select&amp;nbsp; Cond.* from&lt;br&gt;&lt;br&gt;((Select * from Child where enddate is not null) as a&lt;br&gt;Inner join&lt;br&gt;(Select id, max(enddate) as enddate from Child where enddate is not null group by id) as b&lt;br&gt;on a.id = b.id and a. enddate = b. enddate&lt;br&gt;&lt;br&gt;We can than make a union of these that will almost solve our problem.&lt;br&gt;&lt;br&gt;Select x.* from (&lt;br&gt;(Select * from Child where enddate is null) as a&lt;br&gt;Inner join&lt;br&gt;(Select id, max(startdate) as startdate from Child where enddate is null group by id) as b&lt;br&gt;on a.id = b.id and a.startdate = b.startdate&lt;br&gt;) as x&lt;br&gt;&lt;br&gt;union&lt;br&gt;select y.* from (&lt;br&gt;&lt;br&gt;(Select * from Child where enddate is not null) as a&lt;br&gt;Inner join&lt;br&gt;(Select id, max(enddate) as enddate from Child where enddate is not null group by id) as b&lt;br&gt;on a.id = b.id and a. enddate = b. enddate&lt;br&gt;) as y) as cond &lt;br&gt;left outer join&lt;br&gt;( select id from child where EndDATE is null group by id) AS condFilter&lt;br&gt;on cond.id = condFilter.id where ((cond.EndDate is null and condFilter.id is not null) or (cond.EndDate is not null and condFilter.id is null))&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</description>
			<content:encoded>I&apos;ve been working on a particularly poorly designed third party system. In this system child records have a start date and an end date.&lt;br&gt;&lt;br&gt;The system has a flaw in which while allowing one to many links from parent to child records (needed for history), the business logic does not impose the required behaviour. For instance there can be more than one open (null end date) child record when only one should be permitted and all child records can be closed (non null end date) when a child record should only be closed on the creation of a new open record.&lt;br&gt;&lt;br&gt;The reports that I have been tasked with creating therefore required a new filter type on these child records.&lt;br&gt;&lt;br&gt;The filter was needed to return only the open child record with the latest start date or if there is no open child records the record with the latest end date.&lt;br&gt;&lt;br&gt;To do this I split the situation. Firstly we want only the most recent open records. This is fairly simple.&lt;br&gt;&lt;br&gt;(Select * from Child where enddate is null) as a&lt;br&gt;Inner join&lt;br&gt;(Select id, max(startdate) as startdate from Child where enddate is null group by id) as b&lt;br&gt;on a.id = b.id and a.startdate = b.startdate&lt;br&gt;&lt;br&gt;Next we want the most recent end date again fairly simple using the method above.&lt;br&gt;&lt;br&gt;&amp;nbsp;(Select * from Child where enddate is not null) as a&lt;br&gt;Inner join&lt;br&gt;(Select id, max(enddate) as enddate from Child where enddate is not null group by id) as b&lt;br&gt;on a.id = b.id and a. enddate = b. enddate&lt;br&gt;&lt;br&gt;We can than make a union of these that will almost solve our problem.&lt;br&gt;&lt;br&gt;Select x.* from (&lt;br&gt;(Select * from Child where enddate is null) as a&lt;br&gt;Inner join&lt;br&gt;(Select id, max(startdate) as startdate from Child where enddate is null group by id) as b&lt;br&gt;on a.id = b.id and a.startdate = b.startdate&lt;br&gt;) as x&lt;br&gt;&lt;br&gt;union&lt;br&gt;select y.* from (&lt;br&gt;&lt;br&gt;(Select * from Child where enddate is not null) as a&lt;br&gt;Inner join&lt;br&gt;(Select id, max(enddate) as enddate from Child where enddate is not null group by id) as b&lt;br&gt;on a.id = b.id and a. enddate = b. enddate&lt;br&gt;) as y&lt;br&gt;&lt;br&gt;I say almost as their will still be 2 records where open and ended child records are present. So we must apply the conditional filter I detailed in my previous post. The script becoming.&lt;br&gt;&lt;br&gt;Select&amp;nbsp; Cond.* from&lt;br&gt;&lt;br&gt;((Select * from Child where enddate is not null) as a&lt;br&gt;Inner join&lt;br&gt;(Select id, max(enddate) as enddate from Child where enddate is not null group by id) as b&lt;br&gt;on a.id = b.id and a. enddate = b. enddate&lt;br&gt;&lt;br&gt;We can than make a union of these that will almost solve our problem.&lt;br&gt;&lt;br&gt;Select x.* from (&lt;br&gt;(Select * from Child where enddate is null) as a&lt;br&gt;Inner join&lt;br&gt;(Select id, max(startdate) as startdate from Child where enddate is null group by id) as b&lt;br&gt;on a.id = b.id and a.startdate = b.startdate&lt;br&gt;) as x&lt;br&gt;&lt;br&gt;union&lt;br&gt;select y.* from (&lt;br&gt;&lt;br&gt;(Select * from Child where enddate is not null) as a&lt;br&gt;Inner join&lt;br&gt;(Select id, max(enddate) as enddate from Child where enddate is not null group by id) as b&lt;br&gt;on a.id = b.id and a. enddate = b. enddate&lt;br&gt;) as y) as cond &lt;br&gt;left outer join&lt;br&gt;( select id from child where EndDATE is null group by id) AS condFilter&lt;br&gt;on cond.id = condFilter.id where ((cond.EndDate is null and condFilter.id is not null) or (cond.EndDate is not null and condFilter.id is null))&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content:encoded>
			<link>https://thekatswork.ucoz.com/blog/sql_start_and_enddate_filter/2012-07-20-41</link>
			<dc:creator>The_Kat</dc:creator>
			<guid>https://thekatswork.ucoz.com/blog/sql_start_and_enddate_filter/2012-07-20-41</guid>
			<pubDate>Fri, 20 Jul 2012 14:57:11 GMT</pubDate>
		</item>
		<item>
			<title>SQL Conditional Filter</title>
			<description>&lt;br&gt;Sometimes you may wish to filter an sql only if that would give you a record. For example if you have a table that holds several telephone numbers for a customer. The table has a flag &quot;preferred” (True or false) that specifies a users preferred contact number. Now in the SQL we wish to create a list of users complete with telephone numbers. Here is where we hit a snag, due to input errors/business logic bugs. A number of users have been allowed to enter several contact numbers without selecting a preferred one. Therefore we can’t simply filter preferred numbers as this would lead to some customers not having a number were a number does actually exist. &lt;br&gt;&lt;br&gt;The solution I propose is two fold.&lt;br&gt;&lt;br&gt;Firstly, We need to know are preferred numbers available for a user. To do this we first make an sql statement that provides this info. In my example lets select all entries grouped by customer id where preferred. &lt;br&gt;(i.e. &lt;br&gt;
&lt;pre class=&quot;brush: sql&quot;&gt;Select CustomerID as CustomerID2 from TelephoneDetails where preferred group by CustomerID
&lt;/pre&gt; &lt;br&gt;.
) &lt;br&gt;&lt;br&gt;Secondly, To use a xnor logical clause. To create this we need a clause in our sql that states ( (A and B) or ( !A and !B)). Clause A will be simply is the telephone number preferred, clause b will be are preferred numbers available for this customer from above. To apply clause b we must first join the table above to the standard table. To allow non-preferred rows to be returned we need to use an outer join. &lt;br&gt;&lt;br&gt;Our Sql becomes:&lt;br&gt;&lt;br&gt;&lt;pre class=&quot;brush: sql&quot;&gt;Select * from TelephoneDetails as a left outer join (
Select CustomerID as CustomerID2,&amp;nbsp; from TelephoneDetails where preferred group by CustomerID
) as b on a.CustomerID = b.CustomerID2
where (( a.Preffered = 1 and b.CustomerID2 is not null) or (a.Preffered = 0 and b.CustomerID2 is null))&lt;/pre&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
This will now return a customers preffered telephone if set, and other telephone if not.&lt;br&gt;&lt;br&gt;

Given Data 

&lt;br&gt;&lt;br&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;CustomerID&lt;/td&gt;&lt;td&gt;Number&lt;/td&gt;&lt;td&gt;Prefered&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;1251&lt;/td&gt;&lt;td&gt;true&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;1255&lt;/td&gt;&lt;td&gt;false&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;1235&lt;/td&gt;&lt;td&gt;false&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;br&gt;&lt;br&gt;Standard Filter would give

&lt;br&gt;&lt;br&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;CustomerID&lt;/td&gt;&lt;td&gt;Number&lt;/td&gt;&lt;td&gt;Prefered&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;1251&lt;/td&gt;&lt;td&gt;true&lt;/td&gt;&lt;/tr&gt;

&lt;/tbody&gt;&lt;/table&gt;

&lt;br&gt;&lt;br&gt; but our sql returns

&lt;br&gt;&lt;br&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;CustomerID&lt;/td&gt;&lt;td&gt;Number&lt;/td&gt;&lt;td&gt;Prefered&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;1251&lt;/td&gt;&lt;td&gt;true&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;1235&lt;/td&gt;&lt;td&gt;false&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;</description>
			<content:encoded>&lt;br&gt;Sometimes you may wish to filter an sql only if that would give you a record. For example if you have a table that holds several telephone numbers for a customer. The table has a flag &quot;preferred” (True or false) that specifies a users preferred contact number. Now in the SQL we wish to create a list of users complete with telephone numbers. Here is where we hit a snag, due to input errors/business logic bugs. A number of users have been allowed to enter several contact numbers without selecting a preferred one. Therefore we can’t simply filter preferred numbers as this would lead to some customers not having a number were a number does actually exist. &lt;br&gt;&lt;br&gt;The solution I propose is two fold.&lt;br&gt;&lt;br&gt;Firstly, We need to know are preferred numbers available for a user. To do this we first make an sql statement that provides this info. In my example lets select all entries grouped by customer id where preferred. &lt;br&gt;(i.e. &lt;br&gt;
&lt;pre class=&quot;brush: sql&quot;&gt;Select CustomerID as CustomerID2 from TelephoneDetails where preferred group by CustomerID
&lt;/pre&gt; &lt;br&gt;.
) &lt;br&gt;&lt;br&gt;Secondly, To use a xnor logical clause. To create this we need a clause in our sql that states ( (A and B) or ( !A and !B)). Clause A will be simply is the telephone number preferred, clause b will be are preferred numbers available for this customer from above. To apply clause b we must first join the table above to the standard table. To allow non-preferred rows to be returned we need to use an outer join. &lt;br&gt;&lt;br&gt;Our Sql becomes:&lt;br&gt;&lt;br&gt;&lt;pre class=&quot;brush: sql&quot;&gt;Select * from TelephoneDetails as a left outer join (
Select CustomerID as CustomerID2,&amp;nbsp; from TelephoneDetails where preferred group by CustomerID
) as b on a.CustomerID = b.CustomerID2
where (( a.Preffered = 1 and b.CustomerID2 is not null) or (a.Preffered = 0 and b.CustomerID2 is null))&lt;/pre&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
This will now return a customers preffered telephone if set, and other telephone if not.&lt;br&gt;&lt;br&gt;

Given Data 

&lt;br&gt;&lt;br&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;CustomerID&lt;/td&gt;&lt;td&gt;Number&lt;/td&gt;&lt;td&gt;Prefered&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;1251&lt;/td&gt;&lt;td&gt;true&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;1255&lt;/td&gt;&lt;td&gt;false&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;1235&lt;/td&gt;&lt;td&gt;false&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;br&gt;&lt;br&gt;Standard Filter would give

&lt;br&gt;&lt;br&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;CustomerID&lt;/td&gt;&lt;td&gt;Number&lt;/td&gt;&lt;td&gt;Prefered&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;1251&lt;/td&gt;&lt;td&gt;true&lt;/td&gt;&lt;/tr&gt;

&lt;/tbody&gt;&lt;/table&gt;

&lt;br&gt;&lt;br&gt; but our sql returns

&lt;br&gt;&lt;br&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;CustomerID&lt;/td&gt;&lt;td&gt;Number&lt;/td&gt;&lt;td&gt;Prefered&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;1251&lt;/td&gt;&lt;td&gt;true&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;1235&lt;/td&gt;&lt;td&gt;false&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;</content:encoded>
			<link>https://thekatswork.ucoz.com/blog/sql_conditional_filter/2011-10-12-40</link>
			<dc:creator>The_Kat</dc:creator>
			<guid>https://thekatswork.ucoz.com/blog/sql_conditional_filter/2011-10-12-40</guid>
			<pubDate>Wed, 12 Oct 2011 15:50:03 GMT</pubDate>
		</item>
		<item>
			<title>Unlocking SA password in Microsoft SQL Server 2008 on windows server.</title>
			<description>Recently due to transposition errors ( I typed it in wrong,) i had to unlock the SA password on one of our servers (in my defence i didn&apos;t even know this database existed.) &lt;br&gt;&lt;br&gt;Good thing with having an all Microsoft solution is that local admins ,if set up correctly, have access to sql servers as sysadmin.&lt;br&gt;&lt;p style=&quot;margin-bottom: 0cm;&quot;&gt;To enable this behaviour though you must add the local admin to the user group SQLServer2008MSSQLUser$&lt;servername&amp;gt;$&lt;instance&amp;gt;. Which should already exist. A word of warning when I say local admin I mean local admin, not domain users with local admin rights I mean &lt;servername&amp;gt;&amp;#92;&lt;Administrator UserName&amp;gt;.&lt;br&gt;&lt;br&gt;Now to log in using windows authentication using the local admin you must run the server in &quot;single user mode.” To do this stop the SQL Server service. Add -m as a startup parameter than start the service.&lt;br&gt;&lt;br&gt;You will now be able to login into to the sql server using enterprise manager and windows authentication. Once logged in unlock the SA user (you will need to change its password to unlock,). Once SA is unlocked restart the sql service without the -m parameter and log on as SA.&lt;br&gt;&lt;br&gt;I would recommended at this point making a backup SA user and storing its details securely.&lt;br&gt;&lt;br&gt;
&lt;/p&gt;</description>
			<content:encoded>Recently due to transposition errors ( I typed it in wrong,) i had to unlock the SA password on one of our servers (in my defence i didn&apos;t even know this database existed.) &lt;br&gt;&lt;br&gt;Good thing with having an all Microsoft solution is that local admins ,if set up correctly, have access to sql servers as sysadmin.&lt;br&gt;&lt;p style=&quot;margin-bottom: 0cm;&quot;&gt;To enable this behaviour though you must add the local admin to the user group SQLServer2008MSSQLUser$&lt;servername&amp;gt;$&lt;instance&amp;gt;. Which should already exist. A word of warning when I say local admin I mean local admin, not domain users with local admin rights I mean &lt;servername&amp;gt;&amp;#92;&lt;Administrator UserName&amp;gt;.&lt;br&gt;&lt;br&gt;Now to log in using windows authentication using the local admin you must run the server in &quot;single user mode.” To do this stop the SQL Server service. Add -m as a startup parameter than start the service.&lt;br&gt;&lt;br&gt;You will now be able to login into to the sql server using enterprise manager and windows authentication. Once logged in unlock the SA user (you will need to change its password to unlock,). Once SA is unlocked restart the sql service without the -m parameter and log on as SA.&lt;br&gt;&lt;br&gt;I would recommended at this point making a backup SA user and storing its details securely.&lt;br&gt;&lt;br&gt;
&lt;/p&gt;</content:encoded>
			<link>https://thekatswork.ucoz.com/blog/unlocking_sa_password_in_microsoft_sql_server_2008_on_windows_server/2011-09-20-39</link>
			<dc:creator>The_Kat</dc:creator>
			<guid>https://thekatswork.ucoz.com/blog/unlocking_sa_password_in_microsoft_sql_server_2008_on_windows_server/2011-09-20-39</guid>
			<pubDate>Tue, 20 Sep 2011 16:57:56 GMT</pubDate>
		</item>
		<item>
			<title>Oracle Check Connected database in sqlplus.</title>
			<description>After using the set oracle_sid method I had a
few problems with connections in sqlplus. In that even though I would specify
one database I would get the one set in oracle_sid. For this reason I would
suggest it is good practice to run the following code after each connection
just to check your are connected to the right database.
&lt;br&gt;
&lt;br&gt;
&lt;pre class=&quot;brush: sql&quot;&gt;select name from v$database;
&lt;/pre&gt;
&lt;br&gt;
&lt;br&gt;
Tested in 10g and 11g.</description>
			<content:encoded>After using the set oracle_sid method I had a
few problems with connections in sqlplus. In that even though I would specify
one database I would get the one set in oracle_sid. For this reason I would
suggest it is good practice to run the following code after each connection
just to check your are connected to the right database.
&lt;br&gt;
&lt;br&gt;
&lt;pre class=&quot;brush: sql&quot;&gt;select name from v$database;
&lt;/pre&gt;
&lt;br&gt;
&lt;br&gt;
Tested in 10g and 11g.</content:encoded>
			<link>https://thekatswork.ucoz.com/blog/oracle_check_connected_database_in_sqlplus/2011-08-23-38</link>
			<dc:creator>The_Kat</dc:creator>
			<guid>https://thekatswork.ucoz.com/blog/oracle_check_connected_database_in_sqlplus/2011-08-23-38</guid>
			<pubDate>Tue, 23 Aug 2011 13:44:55 GMT</pubDate>
		</item>
		<item>
			<title>Looping through all request parameters in Java.</title>
			<description>Simple few lines of code to loop through a request and print out every parameter and its value.&lt;br&gt;&lt;br&gt;

&lt;pre class=&quot;brush: java&quot;&gt;Enumeration parameterNames = request.getParameterNames();

while (parameterNames.hasMoreElements()){ 
 String requestName = (String)parameterNames.nextElement();
 String comment = equest.getParameter(requestName);

 System.out.println(requestName);
 System.out.println(comment);
}&lt;/pre&gt;</description>
			<content:encoded>Simple few lines of code to loop through a request and print out every parameter and its value.&lt;br&gt;&lt;br&gt;

&lt;pre class=&quot;brush: java&quot;&gt;Enumeration parameterNames = request.getParameterNames();

while (parameterNames.hasMoreElements()){ 
 String requestName = (String)parameterNames.nextElement();
 String comment = equest.getParameter(requestName);

 System.out.println(requestName);
 System.out.println(comment);
}&lt;/pre&gt;</content:encoded>
			<link>https://thekatswork.ucoz.com/blog/looping_through_all_request_parameters_in_java/2011-08-23-37</link>
			<dc:creator>The_Kat</dc:creator>
			<guid>https://thekatswork.ucoz.com/blog/looping_through_all_request_parameters_in_java/2011-08-23-37</guid>
			<pubDate>Tue, 23 Aug 2011 11:07:35 GMT</pubDate>
		</item>
		<item>
			<title>RichtextItem Java Class Crashes Notes (Domino) Server</title>
			<description>&lt;p style=&quot;margin-bottom: 0.5cm; font-style: normal; widows: 2; orphans: 2;&quot;&gt;
&lt;font color=&quot;#000000&quot;&gt;&lt;font face=&quot;Verdana, Tahoma, Arial&quot;&gt;&lt;font style=&quot;font-size: 8pt;&quot; size=&quot;1&quot;&gt;This
problem and solution were found by my esteemed colleague Andrew &quot;Andy
C” Cunliffe.&lt;br&gt;&lt;br&gt;&lt;u&gt;&lt;b&gt;The problem&lt;/b&gt;&lt;/u&gt;&lt;br&gt;&lt;br&gt;In Lotus Notes
8.5 java agents that worked fine in past versions was causing server
crashes. Specifically when working with richtextitem class in a java
agent.&amp;nbsp;&lt;br&gt;&lt;br&gt;The code being effectively this (taken from the
help)&lt;br&gt;&lt;br&gt;&lt;pre class=&quot;brush: java&quot;&gt;
import lotus.domino.*;

public class JavaAgent extends AgentBase {

 public void NotesMain() {

 try {
 Session session = getSession();
 AgentContext agentContext = session.getAgentContext();

 // (Your code goes here)

 DocumentCollection dc = agentContext.getUnprocessedDocuments();
 Document doc = dc.getFirstDocument();
 RichTextItem rti = (RichTextItem)doc.getFirstItem(&quot;Body&quot;);
 RichTextNavigator rtnav = rti.createNavigator;
 rtnav.findFirstElement(RichTextItem.RTELEM_TYPE_TEXTPARAGRAPH);
 rti.beginInsert(rtnav);
 rti.appendText(&quot;Beginning text.&quot;);
 rti.addNewLine(1);
 rti.endInsert();
 doc.save(true,true);
 } catch(Exception e) {
 e.printStackTrace();
 }
}
&lt;/pre&gt;
&lt;br&gt;&lt;br&gt;(Quite
distressing that the actual example given in the help causes a server
crash.)&lt;br&gt;&lt;br&gt;&lt;u&gt;&lt;b&gt;Investigation&lt;/b&gt;&lt;/u&gt;&lt;br&gt;&lt;br&gt;Andy, was able to
find that the command beginInsert was causing the crash. This command
has been recently changed it now accepts an optional Boolean argument
that works as below.&lt;br&gt;·&amp;nbsp;&amp;nbsp;&amp;nbsp; true to put the
insertion position at the end of the element&amp;nbsp;&lt;br&gt;·&amp;nbsp;&amp;nbsp;&amp;nbsp;
false (default) to put the insertion position at the beginning of the
element&amp;nbsp;&lt;br&gt;Now this is the sticking point, in previous notes
versions there was no option and the behaviour of the beginInsert
command was to put the insertion point at the end of the
element.&amp;nbsp;&lt;br&gt;&lt;br&gt;So you can see they have changed the behaviour
of the command having the new function be the default and the
original function be the alternative function. This was further
exasperated by the realisation that the setting of the optional
argument to true (i.e. to pick the original function) stops the
server crashing.&lt;br&gt;&lt;br&gt;&lt;u&gt;&lt;b&gt;The Solution&lt;/b&gt;&lt;/u&gt;&lt;br&gt;&lt;br&gt;So to
conclude the solution to this problem is to change the beginInsert
command from&lt;br&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;br&gt;&lt;br&gt;
&lt;/p&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; width=&quot;184&quot;&gt;
 &lt;colgroup&gt;&lt;col width=&quot;180&quot;&gt;
 &lt;/colgroup&gt;&lt;tbody&gt;&lt;tr&gt;
 &lt;td width=&quot;180&quot;&gt;
 &lt;p style=&quot;border: medium none; padding: 0cm;&quot;&gt;&lt;br&gt;rti.beginInsert(rtnav);&lt;br&gt;&lt;br&gt;to&amp;nbsp;&lt;br&gt;&lt;br&gt;rti.beginInsert(rtnav
 , true);&lt;/p&gt;
 &lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;p style=&quot;widows: 2; orphans: 2;&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;&lt;font face=&quot;Verdana, Tahoma, Arial&quot;&gt;&lt;font style=&quot;font-size: 8pt;&quot; size=&quot;1&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span&gt;&lt;br&gt;&lt;br&gt;I
can only think that the new &quot;insertion position at the beginning
of the element” is massively resource hungry or not properly
garbage collected. Our more high spec servers were able to survive
this code. While the server in question could only run the code in
&quot;insertion position at the end of the element” mode.&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;</description>
			<content:encoded>&lt;p style=&quot;margin-bottom: 0.5cm; font-style: normal; widows: 2; orphans: 2;&quot;&gt;
&lt;font color=&quot;#000000&quot;&gt;&lt;font face=&quot;Verdana, Tahoma, Arial&quot;&gt;&lt;font style=&quot;font-size: 8pt;&quot; size=&quot;1&quot;&gt;This
problem and solution were found by my esteemed colleague Andrew &quot;Andy
C” Cunliffe.&lt;br&gt;&lt;br&gt;&lt;u&gt;&lt;b&gt;The problem&lt;/b&gt;&lt;/u&gt;&lt;br&gt;&lt;br&gt;In Lotus Notes
8.5 java agents that worked fine in past versions was causing server
crashes. Specifically when working with richtextitem class in a java
agent.&amp;nbsp;&lt;br&gt;&lt;br&gt;The code being effectively this (taken from the
help)&lt;br&gt;&lt;br&gt;&lt;pre class=&quot;brush: java&quot;&gt;
import lotus.domino.*;

public class JavaAgent extends AgentBase {

 public void NotesMain() {

 try {
 Session session = getSession();
 AgentContext agentContext = session.getAgentContext();

 // (Your code goes here)

 DocumentCollection dc = agentContext.getUnprocessedDocuments();
 Document doc = dc.getFirstDocument();
 RichTextItem rti = (RichTextItem)doc.getFirstItem(&quot;Body&quot;);
 RichTextNavigator rtnav = rti.createNavigator;
 rtnav.findFirstElement(RichTextItem.RTELEM_TYPE_TEXTPARAGRAPH);
 rti.beginInsert(rtnav);
 rti.appendText(&quot;Beginning text.&quot;);
 rti.addNewLine(1);
 rti.endInsert();
 doc.save(true,true);
 } catch(Exception e) {
 e.printStackTrace();
 }
}
&lt;/pre&gt;
&lt;br&gt;&lt;br&gt;(Quite
distressing that the actual example given in the help causes a server
crash.)&lt;br&gt;&lt;br&gt;&lt;u&gt;&lt;b&gt;Investigation&lt;/b&gt;&lt;/u&gt;&lt;br&gt;&lt;br&gt;Andy, was able to
find that the command beginInsert was causing the crash. This command
has been recently changed it now accepts an optional Boolean argument
that works as below.&lt;br&gt;·&amp;nbsp;&amp;nbsp;&amp;nbsp; true to put the
insertion position at the end of the element&amp;nbsp;&lt;br&gt;·&amp;nbsp;&amp;nbsp;&amp;nbsp;
false (default) to put the insertion position at the beginning of the
element&amp;nbsp;&lt;br&gt;Now this is the sticking point, in previous notes
versions there was no option and the behaviour of the beginInsert
command was to put the insertion point at the end of the
element.&amp;nbsp;&lt;br&gt;&lt;br&gt;So you can see they have changed the behaviour
of the command having the new function be the default and the
original function be the alternative function. This was further
exasperated by the realisation that the setting of the optional
argument to true (i.e. to pick the original function) stops the
server crashing.&lt;br&gt;&lt;br&gt;&lt;u&gt;&lt;b&gt;The Solution&lt;/b&gt;&lt;/u&gt;&lt;br&gt;&lt;br&gt;So to
conclude the solution to this problem is to change the beginInsert
command from&lt;br&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;br&gt;&lt;br&gt;
&lt;/p&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; width=&quot;184&quot;&gt;
 &lt;colgroup&gt;&lt;col width=&quot;180&quot;&gt;
 &lt;/colgroup&gt;&lt;tbody&gt;&lt;tr&gt;
 &lt;td width=&quot;180&quot;&gt;
 &lt;p style=&quot;border: medium none; padding: 0cm;&quot;&gt;&lt;br&gt;rti.beginInsert(rtnav);&lt;br&gt;&lt;br&gt;to&amp;nbsp;&lt;br&gt;&lt;br&gt;rti.beginInsert(rtnav
 , true);&lt;/p&gt;
 &lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;p style=&quot;widows: 2; orphans: 2;&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;&lt;font face=&quot;Verdana, Tahoma, Arial&quot;&gt;&lt;font style=&quot;font-size: 8pt;&quot; size=&quot;1&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span&gt;&lt;br&gt;&lt;br&gt;I
can only think that the new &quot;insertion position at the beginning
of the element” is massively resource hungry or not properly
garbage collected. Our more high spec servers were able to survive
this code. While the server in question could only run the code in
&quot;insertion position at the end of the element” mode.&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;</content:encoded>
			<link>https://thekatswork.ucoz.com/blog/richtextitem_java_class_crashes_notes_domino_server/2011-08-10-36</link>
			<dc:creator>The_Kat</dc:creator>
			<guid>https://thekatswork.ucoz.com/blog/richtextitem_java_class_crashes_notes_domino_server/2011-08-10-36</guid>
			<pubDate>Wed, 10 Aug 2011 19:11:35 GMT</pubDate>
		</item>
		<item>
			<title>Apologises again</title>
			<description>Mega busy, so been unable to get to grips with promised blog posts.&amp;nbsp;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Light at the end of the tunnel now.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Been working on some very cool new functions for&amp;nbsp;&lt;a href=&quot;http://www.spree4.com/&quot;&gt;Spree4.com&lt;/a&gt;. Its going to get seriously interesting over there very soon,&amp;nbsp;&lt;a href=&quot;http://www.spree4.com/&quot;&gt;watch this space&lt;/a&gt;. Hopefully it&apos;ll help people get even more value out of the site.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;The day job has seen massive amounts of basic aplications, meaning not much to post about except when lotus notes annoys the hell out of me and I have to vent.&lt;/div&gt;</description>
			<content:encoded>Mega busy, so been unable to get to grips with promised blog posts.&amp;nbsp;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Light at the end of the tunnel now.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Been working on some very cool new functions for&amp;nbsp;&lt;a href=&quot;http://www.spree4.com/&quot;&gt;Spree4.com&lt;/a&gt;. Its going to get seriously interesting over there very soon,&amp;nbsp;&lt;a href=&quot;http://www.spree4.com/&quot;&gt;watch this space&lt;/a&gt;. Hopefully it&apos;ll help people get even more value out of the site.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;The day job has seen massive amounts of basic aplications, meaning not much to post about except when lotus notes annoys the hell out of me and I have to vent.&lt;/div&gt;</content:encoded>
			<link>https://thekatswork.ucoz.com/blog/apologises_again/2011-08-10-35</link>
			<dc:creator>The_Kat</dc:creator>
			<guid>https://thekatswork.ucoz.com/blog/apologises_again/2011-08-10-35</guid>
			<pubDate>Wed, 10 Aug 2011 19:07:10 GMT</pubDate>
		</item>
		<item>
			<title>Can&apos;t Open new NotesDocument in Frame</title>
			<description>&lt;br&gt;From discussion with others recently it became clear that we really should log lotus notes bugs. Not with IBM source of the infamous &quot;We are aware of this problem. There are no plans currently to deal with this problem.” Somewhere that updates and workarounds can be added. In short here.&lt;br&gt;&lt;br&gt;I&apos;ll try to be as objective as possible, and swear to let my blood cool before posting any.&lt;br&gt;&lt;br&gt;First up, for no other reason than I came across it (again) most recently is....&lt;br&gt;&lt;br&gt;The fact that you can not show a newly created document in a frame. (or editDocument ,setFrame and new notesdocument error.)&lt;br&gt;&lt;br&gt;A little background to this error is that it has been present since release 5 and is still present in 8.5. &lt;br&gt;&lt;br&gt;In essence the following code will not work.&lt;br&gt;&lt;br&gt;Dim ws as new notesuiworkspace&lt;br&gt;&lt;br&gt;call ws.setTargetFrame(&quot;NotesView”)&lt;br&gt;&lt;br&gt;dim session as new notessession&lt;br&gt;&lt;br&gt;dim doc as notesdocument&lt;br&gt;&lt;br&gt;set doc = session.currentDatabase.createDocument&lt;br&gt;doc.form = &quot;myForm”&lt;br&gt;doc.field1 = &quot;1”&lt;br&gt;&lt;br&gt;&lt;br&gt;call ws.editDocument(false,doc)&lt;br&gt;&lt;br&gt;Now it doesn&apos;t throw an error as it is valid code. It just doesn&apos;t work. Many people will ask why not use the compose method. Firstly why should we have to when this command should work (and does if we don&apos;t target a frame.) Secondly as you can see we are trying to pre-fill some fields with data (in this case field1).&lt;br&gt;&lt;br&gt;Several workarounds exist:&lt;br&gt;&lt;br&gt;1.use NotesUiWorkspace method compose. Get a handle to the compsed uidoc set any fields you need using uidoc methods than call a refresh of the uidoc. i.e.&lt;br&gt;&lt;br&gt;&lt;table style=&quot;width: 100%; border: 1px solid rgb(0, 0, 0);&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim ws As New NotesUIWorkspace&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Call ws.SetTargetFrame(&quot;NotesView&quot;)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim uidoc As NotesUIDocument&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set uidoc =&amp;nbsp; ws.ComposeDocument(&quot;&quot;,&quot;&quot;,&quot;myForm&quot;)&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Call uidoc.Document.ReplaceItemValue(&quot;field1&quot;,&quot;1&quot;)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Call uidoc.Refresh&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br&gt;&lt;br&gt;2.Call a save of the document before calling ws.editDocument. Yes that correct if the document has been saved it works. This however is not appropriate for forms that either shouldn&apos;t be saved or or need saving at the users request.&lt;br&gt;&lt;br&gt;3.Use formula on the form to fill your fields on compose, pass parameters using environment variable.&lt;br&gt;&lt;br&gt;As you can see none of the workarounds are perfect. The first one is almost their but will cause some screen flicker. IBM have deemed this bug not worthy to fix in 3 whole release and countless updates. Possibly the existence of the above bodges stop them from caring. This however is a common problem in Lotus notes programming that you often come up against cases where something should work but doesn&apos;t and you must find the specifc work around for you problem.&lt;br&gt;&lt;br&gt;</description>
			<content:encoded>&lt;br&gt;From discussion with others recently it became clear that we really should log lotus notes bugs. Not with IBM source of the infamous &quot;We are aware of this problem. There are no plans currently to deal with this problem.” Somewhere that updates and workarounds can be added. In short here.&lt;br&gt;&lt;br&gt;I&apos;ll try to be as objective as possible, and swear to let my blood cool before posting any.&lt;br&gt;&lt;br&gt;First up, for no other reason than I came across it (again) most recently is....&lt;br&gt;&lt;br&gt;The fact that you can not show a newly created document in a frame. (or editDocument ,setFrame and new notesdocument error.)&lt;br&gt;&lt;br&gt;A little background to this error is that it has been present since release 5 and is still present in 8.5. &lt;br&gt;&lt;br&gt;In essence the following code will not work.&lt;br&gt;&lt;br&gt;Dim ws as new notesuiworkspace&lt;br&gt;&lt;br&gt;call ws.setTargetFrame(&quot;NotesView”)&lt;br&gt;&lt;br&gt;dim session as new notessession&lt;br&gt;&lt;br&gt;dim doc as notesdocument&lt;br&gt;&lt;br&gt;set doc = session.currentDatabase.createDocument&lt;br&gt;doc.form = &quot;myForm”&lt;br&gt;doc.field1 = &quot;1”&lt;br&gt;&lt;br&gt;&lt;br&gt;call ws.editDocument(false,doc)&lt;br&gt;&lt;br&gt;Now it doesn&apos;t throw an error as it is valid code. It just doesn&apos;t work. Many people will ask why not use the compose method. Firstly why should we have to when this command should work (and does if we don&apos;t target a frame.) Secondly as you can see we are trying to pre-fill some fields with data (in this case field1).&lt;br&gt;&lt;br&gt;Several workarounds exist:&lt;br&gt;&lt;br&gt;1.use NotesUiWorkspace method compose. Get a handle to the compsed uidoc set any fields you need using uidoc methods than call a refresh of the uidoc. i.e.&lt;br&gt;&lt;br&gt;&lt;table style=&quot;width: 100%; border: 1px solid rgb(0, 0, 0);&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim ws As New NotesUIWorkspace&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Call ws.SetTargetFrame(&quot;NotesView&quot;)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim uidoc As NotesUIDocument&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set uidoc =&amp;nbsp; ws.ComposeDocument(&quot;&quot;,&quot;&quot;,&quot;myForm&quot;)&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Call uidoc.Document.ReplaceItemValue(&quot;field1&quot;,&quot;1&quot;)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Call uidoc.Refresh&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br&gt;&lt;br&gt;2.Call a save of the document before calling ws.editDocument. Yes that correct if the document has been saved it works. This however is not appropriate for forms that either shouldn&apos;t be saved or or need saving at the users request.&lt;br&gt;&lt;br&gt;3.Use formula on the form to fill your fields on compose, pass parameters using environment variable.&lt;br&gt;&lt;br&gt;As you can see none of the workarounds are perfect. The first one is almost their but will cause some screen flicker. IBM have deemed this bug not worthy to fix in 3 whole release and countless updates. Possibly the existence of the above bodges stop them from caring. This however is a common problem in Lotus notes programming that you often come up against cases where something should work but doesn&apos;t and you must find the specifc work around for you problem.&lt;br&gt;&lt;br&gt;</content:encoded>
			<link>https://thekatswork.ucoz.com/blog/can_39_t_open_new_notesdocument_in_frame/2011-06-02-32</link>
			<dc:creator>The_Kat</dc:creator>
			<guid>https://thekatswork.ucoz.com/blog/can_39_t_open_new_notesdocument_in_frame/2011-06-02-32</guid>
			<pubDate>Thu, 02 Jun 2011 16:03:58 GMT</pubDate>
		</item>
		<item>
			<title>Raising IT Problem Calls for beginners</title>
			<description>In IT we tend to get a lot of problems raised(Calls) where the information provided is insufficient or inappropriate for the solution of the problem. This often leads to extended resolution times due to having to fill in the background information on a problem before even starting to look for a solution. This isn’t just inefficient its poor customer service to have to contact the customer to fill in details on a problem they have raised. While we IT staff are guilty ourselves for not providing sufficient logging of errors, even the best logging of errors is only an aid to a user generated call.&lt;br&gt;&lt;br&gt;Lets look at simple non-technical example (I’ll post a more detailed study later in this document.)&lt;br&gt;&lt;br&gt;&lt;b&gt;The Situation&lt;/b&gt;&lt;br&gt;&lt;br&gt;&quot;I had just been grocery shopping. I tried to open the door to the kitchen, but the handle didn’t work.”&lt;br&gt;&lt;br&gt;&lt;b&gt;Possible Problems Raised (Calls)&lt;/b&gt;&lt;br&gt;&lt;br&gt;&quot;Unable to put shopping in fridge.”&lt;br&gt;&quot;Unable to get through door.”&lt;br&gt;&quot;Handle broke on door to IT Kitchen.”&lt;br&gt;&lt;br&gt;As you can see the quality of the calls can change wildly from being nothing to do with the actual problem, to very helpful.&lt;br&gt;&lt;br&gt;If we look at the first call &quot;Unable to put shopping in fridge.” It may look silly but from the users point of view this is the actual problem. They can’t get to the fridge to put their shopping into it. It will however lead to a highly inefficient solution process. &lt;br&gt;&lt;br&gt;Firstly there is no information about which fridge the user is unable to access. So more data will have to be gathered, either by contacting the user again or checking which fridges the user has access to and checking them all. Once they know which fridge, they can than send their fridge specialist to take a look. Once on site he will find that the real problem is with the door to the kitchen. This will than be reassigned to a locksmith who in turn will have to visit the site at a later date. &lt;br&gt;&lt;br&gt;&lt;b&gt;When raising a call you should follow the following guidelines.&lt;/b&gt;&lt;br&gt;&lt;br&gt;Try to be specific about the problem you had, Superfluous, non-related or demographic information will only confuse and slow the problem solving process. &lt;br&gt;&lt;br&gt;Describe exactly what you were doing when the problem occurred, (but keep it task related they don’t need to know you was drinking a brew.) &lt;br&gt;&lt;br&gt;Be detailed in your description of the actual problem. Every bit of information about the problem is one bit of information the problem solver doesn’t have to find or ask you about at a later date. To you it might be that you got an error while saving a record, to them it may be that the button you pressed to save didn’t work properly.&lt;br&gt;&lt;br&gt;Always give reference numbers, where available.&lt;br&gt;&lt;br&gt;Give a time and date for the problem, as accurately as you can.&lt;br&gt;&lt;br&gt;So next I’ll give a detailed technical example to illustrate the differing levels. You will be surprised the number of calls I have received of type 1 &amp;amp; 2. Mostly calls fall into types 4-7 and this does tend to increase overheads to problem resolution. (I have never received a type 10 or better call and have only received a handful of 9s.&lt;br&gt;&lt;b&gt;&lt;br&gt;Situation&lt;/b&gt;&lt;br&gt;&lt;br&gt;While in the company’s HR system, a user is amending absence records so that the monthly absence can be created. They are adding an occurrence of absence for employee 100001. When they save the record they get an error message. The error message reads &quot;Exception 27 during insert of Absence Record”.&lt;br&gt;&lt;br&gt;Now there is a spectrum of ways in which this problem could be raised. Each of them having impact on the efficiency of the problem resolution. Here are some examples and the problems with each.&lt;br&gt;&lt;br&gt;Very low Efficiency&lt;br&gt;&lt;br&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;I got an error.”&lt;br&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;Can’t run monthly Absence Reports.”&lt;br&gt;3.&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;I was in the hr system and got an Error”&lt;br&gt;4.&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;I was in the absence module of the HR system and got an error.”&lt;br&gt;5.&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;I was adding an absence and got an Error.”&lt;br&gt;6.&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;I had entered a new absence record. When I tried to save it I got an error.”&lt;br&gt;7.&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;I had entered a new absence record. When I tried to save it I got the error Exception 27 during insert of Absence Record.”&lt;br&gt;8.&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;I had entered a new absence record for employee number 1000001. When I tried to save it I got the error Exception 27 during insert of Absence Record.”&lt;br&gt;9.&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;I had entered a new absence record for employee number 1000001. When I tried to save it I got the error Exception 27 during insert of Absence Record. This error occurred on the 12th July at 1pm.”&lt;br&gt;10.&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;I had entered a new absence record for employee number 1000001. I put the following information in…………..When I clicked the &quot;save” button at the top right hand corner I got the error Exception 27 during insert of Absence Record. This error occurred on the 12th July at 1pm.”&lt;br&gt;&lt;br&gt;Highly Efficient&lt;br&gt;&lt;br&gt;&lt;br&gt;As you can see the difference a few important facts make to a call can be amazing. By providing the information that someone needs to tackle your problem straight away you are ensure your problem is fixed as soon as possible. The only problem being that the first time you log a type ten call, they’ll probably be so awed by the detail they sit and admire it for a while.&lt;br&gt;</description>
			<content:encoded>In IT we tend to get a lot of problems raised(Calls) where the information provided is insufficient or inappropriate for the solution of the problem. This often leads to extended resolution times due to having to fill in the background information on a problem before even starting to look for a solution. This isn’t just inefficient its poor customer service to have to contact the customer to fill in details on a problem they have raised. While we IT staff are guilty ourselves for not providing sufficient logging of errors, even the best logging of errors is only an aid to a user generated call.&lt;br&gt;&lt;br&gt;Lets look at simple non-technical example (I’ll post a more detailed study later in this document.)&lt;br&gt;&lt;br&gt;&lt;b&gt;The Situation&lt;/b&gt;&lt;br&gt;&lt;br&gt;&quot;I had just been grocery shopping. I tried to open the door to the kitchen, but the handle didn’t work.”&lt;br&gt;&lt;br&gt;&lt;b&gt;Possible Problems Raised (Calls)&lt;/b&gt;&lt;br&gt;&lt;br&gt;&quot;Unable to put shopping in fridge.”&lt;br&gt;&quot;Unable to get through door.”&lt;br&gt;&quot;Handle broke on door to IT Kitchen.”&lt;br&gt;&lt;br&gt;As you can see the quality of the calls can change wildly from being nothing to do with the actual problem, to very helpful.&lt;br&gt;&lt;br&gt;If we look at the first call &quot;Unable to put shopping in fridge.” It may look silly but from the users point of view this is the actual problem. They can’t get to the fridge to put their shopping into it. It will however lead to a highly inefficient solution process. &lt;br&gt;&lt;br&gt;Firstly there is no information about which fridge the user is unable to access. So more data will have to be gathered, either by contacting the user again or checking which fridges the user has access to and checking them all. Once they know which fridge, they can than send their fridge specialist to take a look. Once on site he will find that the real problem is with the door to the kitchen. This will than be reassigned to a locksmith who in turn will have to visit the site at a later date. &lt;br&gt;&lt;br&gt;&lt;b&gt;When raising a call you should follow the following guidelines.&lt;/b&gt;&lt;br&gt;&lt;br&gt;Try to be specific about the problem you had, Superfluous, non-related or demographic information will only confuse and slow the problem solving process. &lt;br&gt;&lt;br&gt;Describe exactly what you were doing when the problem occurred, (but keep it task related they don’t need to know you was drinking a brew.) &lt;br&gt;&lt;br&gt;Be detailed in your description of the actual problem. Every bit of information about the problem is one bit of information the problem solver doesn’t have to find or ask you about at a later date. To you it might be that you got an error while saving a record, to them it may be that the button you pressed to save didn’t work properly.&lt;br&gt;&lt;br&gt;Always give reference numbers, where available.&lt;br&gt;&lt;br&gt;Give a time and date for the problem, as accurately as you can.&lt;br&gt;&lt;br&gt;So next I’ll give a detailed technical example to illustrate the differing levels. You will be surprised the number of calls I have received of type 1 &amp;amp; 2. Mostly calls fall into types 4-7 and this does tend to increase overheads to problem resolution. (I have never received a type 10 or better call and have only received a handful of 9s.&lt;br&gt;&lt;b&gt;&lt;br&gt;Situation&lt;/b&gt;&lt;br&gt;&lt;br&gt;While in the company’s HR system, a user is amending absence records so that the monthly absence can be created. They are adding an occurrence of absence for employee 100001. When they save the record they get an error message. The error message reads &quot;Exception 27 during insert of Absence Record”.&lt;br&gt;&lt;br&gt;Now there is a spectrum of ways in which this problem could be raised. Each of them having impact on the efficiency of the problem resolution. Here are some examples and the problems with each.&lt;br&gt;&lt;br&gt;Very low Efficiency&lt;br&gt;&lt;br&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;I got an error.”&lt;br&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;Can’t run monthly Absence Reports.”&lt;br&gt;3.&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;I was in the hr system and got an Error”&lt;br&gt;4.&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;I was in the absence module of the HR system and got an error.”&lt;br&gt;5.&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;I was adding an absence and got an Error.”&lt;br&gt;6.&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;I had entered a new absence record. When I tried to save it I got an error.”&lt;br&gt;7.&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;I had entered a new absence record. When I tried to save it I got the error Exception 27 during insert of Absence Record.”&lt;br&gt;8.&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;I had entered a new absence record for employee number 1000001. When I tried to save it I got the error Exception 27 during insert of Absence Record.”&lt;br&gt;9.&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;I had entered a new absence record for employee number 1000001. When I tried to save it I got the error Exception 27 during insert of Absence Record. This error occurred on the 12th July at 1pm.”&lt;br&gt;10.&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;I had entered a new absence record for employee number 1000001. I put the following information in…………..When I clicked the &quot;save” button at the top right hand corner I got the error Exception 27 during insert of Absence Record. This error occurred on the 12th July at 1pm.”&lt;br&gt;&lt;br&gt;Highly Efficient&lt;br&gt;&lt;br&gt;&lt;br&gt;As you can see the difference a few important facts make to a call can be amazing. By providing the information that someone needs to tackle your problem straight away you are ensure your problem is fixed as soon as possible. The only problem being that the first time you log a type ten call, they’ll probably be so awed by the detail they sit and admire it for a while.&lt;br&gt;</content:encoded>
			<link>https://thekatswork.ucoz.com/blog/raising_it_problem_calls_for_beginners/2011-06-02-31</link>
			<dc:creator>The_Kat</dc:creator>
			<guid>https://thekatswork.ucoz.com/blog/raising_it_problem_calls_for_beginners/2011-06-02-31</guid>
			<pubDate>Thu, 02 Jun 2011 11:52:44 GMT</pubDate>
		</item>
	</channel>
</rss>