<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' version='2.0'><channel><atom:id>tag:blogger.com,1999:blog-8710553421145122378</atom:id><lastBuildDate>Tue, 30 Sep 2008 18:53:38 +0000</lastBuildDate><title>Data WareHouse Helpdesk</title><description></description><link>http://www.dwhelpdesk.com/</link><managingEditor>noreply@blogger.com (DW Helpdesk)</managingEditor><generator>Blogger</generator><openSearch:totalResults>9</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-8710553421145122378.post-8579876161784393093</guid><pubDate>Tue, 30 Sep 2008 18:52:00 +0000</pubDate><atom:updated>2008-09-30T11:53:13.316-07:00</atom:updated><title>to delete services widows</title><description>run this in command prompt of windows: sc delete [service name] - to delete services from administrative tools &gt; service</description><link>http://www.dwhelpdesk.com/2008/09/to-delete-services-widows.html</link><author>noreply@blogger.com (DW Helpdesk)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-8710553421145122378.post-7431195436899281266</guid><pubDate>Tue, 30 Sep 2008 18:51:00 +0000</pubDate><atom:updated>2008-09-30T11:53:38.486-07:00</atom:updated><title>Installing oracle 9i</title><description>&lt;a href="http://cisnet.baruch.cuny.edu/holowczak/oracle/install/9i/"&gt;http://cisnet.baruch.cuny.edu/holowczak/oracle/install/9i/&lt;/a&gt;</description><link>http://www.dwhelpdesk.com/2008/09/installing-oracle-9i.html</link><author>noreply@blogger.com (DW Helpdesk)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-8710553421145122378.post-2038701823834574027</guid><pubDate>Tue, 16 Sep 2008 15:44:00 +0000</pubDate><atom:updated>2008-09-16T08:45:12.431-07:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>SQL</category><title>Table Data Elements</title><description>SELECT COLUMNS.COLNO, COLUMNS.TABSCHEMA, COLUMNS.TABNAME, COLUMNS.COLNAME, COLUMNS.TYPENAME, COLUMNS.LENGTH, COLUMNS.SCALE, COLUMNS.NULLS, COLUMNS.IDENTITY, COLUMNS.GENERATED&lt;br /&gt;FROM SYSCAT.COLUMNS COLUMNS&lt;br /&gt;WHERE (COLUMNS.TABSCHEMA='STAGE') OR (COLUMNS.TABSCHEMA='EDW')&lt;br /&gt;ORDER BY COLUMNS.TABSCHEMA, COLUMNS.TABNAME, COLUMNS.COLNO</description><link>http://www.dwhelpdesk.com/2008/09/table-data-elements.html</link><author>noreply@blogger.com (DW Helpdesk)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-8710553421145122378.post-3212158906081288698</guid><pubDate>Fri, 12 Sep 2008 19:42:00 +0000</pubDate><atom:updated>2008-09-12T12:45:00.814-07:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Data WareHousing</category><title>Data WareHousing Interview Questions &amp; Answers</title><description>&lt;a href="http://datawarehousingfaq.blogspot.com/2008/08/data-warehousing-faqs-ii.html"&gt;http://datawarehousingfaq.blogspot.com/2008/08/data-warehousing-faqs-ii.html&lt;/a&gt;</description><link>http://www.dwhelpdesk.com/2008/09/data-warehousing-interview-questions.html</link><author>noreply@blogger.com (DW Helpdesk)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-8710553421145122378.post-6218207453360744096</guid><pubDate>Fri, 12 Sep 2008 19:35:00 +0000</pubDate><atom:updated>2008-09-12T12:44:20.232-07:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>SQL</category><title>SQL Help Articles</title><description>&lt;a href="http://guelphdad.wefixtech.co.uk/sqlhelp/index.shtml"&gt;http://guelphdad.wefixtech.co.uk/sqlhelp/index.shtml&lt;/a&gt;</description><link>http://www.dwhelpdesk.com/2008/09/sql-help-articles.html</link><author>noreply@blogger.com (DW Helpdesk)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-8710553421145122378.post-2260252776284684225</guid><pubDate>Fri, 12 Sep 2008 19:26:00 +0000</pubDate><atom:updated>2008-09-12T12:44:20.233-07:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>SQL</category><title>Basic joins</title><description>By David J. Lake (2006-09-09)&lt;br /&gt;&lt;br /&gt;There are two basic types of joins INNER joins and OUTER joins. An outer join can be LEFT OUTER or RIGHT OUTER. If you think about your reading habits it is best to use the join in the direction you read from. English is read from left to right for instance so I always use LEFT joins. That way I remember the first table I'm joining is the one on the left. &lt;br /&gt;&lt;br /&gt;Note that the word OUTER is optional so you may see both LEFT OUTER JOIN and LEFT JOIN used. I like to see easily that I'm using an outer join so always label it as such.&lt;br /&gt;&lt;br /&gt;When should you use an INNER join and when an OUTER? When you want your results to return the data from the two tables that are in both tables then use an INNER join. When you want all rows from a table, irrespective of whether or not there are matched rows in the other table, then use an OUTER join.&lt;br /&gt;&lt;br /&gt;For our scenario we will use a basic team example with tables for players, teams and playersonteams.&lt;br /&gt;&lt;br /&gt;create table players( &lt;br /&gt;playerid int auto_increment primary key, &lt;br /&gt;firstname varchar(15), &lt;br /&gt;lastname varchar(25));&lt;br /&gt;&lt;br /&gt;insert into players values&lt;br /&gt;(1,'Roy','Halladay'), &lt;br /&gt;(2,'Roger','Clemens'), &lt;br /&gt;(3,'Bobby', 'Abreu');&lt;br /&gt;&lt;br /&gt;create table teams( &lt;br /&gt;teamid int auto_increment primary key,&lt;br /&gt;teamname varchar(40));&lt;br /&gt;&lt;br /&gt;insert into teams values &lt;br /&gt;(1, 'Toronto Blue Jays'), &lt;br /&gt;(2,'Philadelphia Phillies'), &lt;br /&gt;(3,'Houston Astros');&lt;br /&gt;&lt;br /&gt;create table playersonteams( &lt;br /&gt;pid int, &lt;br /&gt;tid int, &lt;br /&gt;primary key (pid,tid));&lt;br /&gt;&lt;br /&gt;insert into playersonteams values&lt;br /&gt;(1,1),(3,2); &lt;br /&gt;&lt;br /&gt;Let's use an inner join to list the players and each team they are on.&lt;br /&gt;&lt;br /&gt;select &lt;br /&gt;playerid, &lt;br /&gt;firstname, &lt;br /&gt;lastname, &lt;br /&gt;teamname &lt;br /&gt;from players &lt;br /&gt;inner join playersonteams &lt;br /&gt;on playerid = pid &lt;br /&gt;inner join teams &lt;br /&gt;on teamid = tid &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;+----------+-----------+----------+-----------------------+&lt;br /&gt;| playerid | firstname | lastname | teamname              |&lt;br /&gt;+----------+-----------+----------+-----------------------+&lt;br /&gt;|        1 | Roy       | Halladay | Toronto Blue Jays     | &lt;br /&gt;|        3 | Bobby     | Abreu    | Philadelphia Phillies | &lt;br /&gt;+----------+-----------+----------+-----------------------+&lt;br /&gt;&lt;br /&gt;You'll note that the list does not include Roger Clemens. At the beginning of the year he was thinking about retiring again! But what if you wanted to list him as well? In that case switch the join to an outer join and it will list all players irrespective of whether or not they are on a team.&lt;br /&gt;&lt;br /&gt;select &lt;br /&gt;playerid, &lt;br /&gt;firstname, &lt;br /&gt;lastname, &lt;br /&gt;teamname &lt;br /&gt;from players &lt;br /&gt;left outer join playersonteams &lt;br /&gt;on playerid = pid &lt;br /&gt;left outer join teams &lt;br /&gt;on teamid = tid &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;+----------+-----------+----------+-----------------------+&lt;br /&gt;| playerid | firstname | lastname | teamname              |&lt;br /&gt;+----------+-----------+----------+-----------------------+&lt;br /&gt;|        1 | Roy       | Halladay | Toronto Blue Jays     | &lt;br /&gt;|        2 | Roger     | Clemens  | NULL                  | &lt;br /&gt;|        3 | Bobby     | Abreu    | Philadelphia Phillies | &lt;br /&gt;+----------+-----------+----------+-----------------------+&lt;br /&gt;&lt;br /&gt;Note that NULL is the correct team to show up for Clemens, his team status is unknown, you should not show a blank value or use an empty string in place of a NULL. Doing so can throw your count off for instance. When you use an aggregate like sum or count, rows with NULL are not counted. That being said, you can leave the value NULL but display it differently. Suppose you want to show any players that are not on a team as None to indicate they aren't on a team. In that case, modify the query as follows. It will still leave the status in the table as NULL and thus won't count incorrectly.&lt;br /&gt;&lt;br /&gt;select &lt;br /&gt;playerid, &lt;br /&gt;firstname, &lt;br /&gt;lastname, &lt;br /&gt;coalesce(teamname,'None') as teamname&lt;br /&gt;from players &lt;br /&gt;left outer join playersonteams &lt;br /&gt;on playerid = pid &lt;br /&gt;left outer join teams &lt;br /&gt;on teamid = tid &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;+----------+-----------+----------+---------------------------+&lt;br /&gt;| playerid | firstname | lastname | teamname                  |&lt;br /&gt;+----------+-----------+----------+---------------------------+&lt;br /&gt;|        1 | Roy       | Halladay | Toronto Blue Jays         | &lt;br /&gt;|        2 | Roger     | Clemens  | None                      | &lt;br /&gt;|        3 | Bobby     | Abreu    | Philadelphia Phillies     | &lt;br /&gt;+----------+-----------+----------+---------------------------+&lt;br /&gt;&lt;br /&gt;The coalesce says that in the case where a NULL would show up for the team name then write the word None in place of the NULL.&lt;br /&gt;&lt;br /&gt;A final important note is to notice that I have joined one table and then the next table, they have been done specifically using an ON clause. I then join the final table using another ON clause. Please get into this habit. I see many people using the syntax that I used to use, which is a list of the tables being joined with a where clause and a bunch of ANDs listing the conditions joining the tables.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;select &lt;br /&gt;playerid, &lt;br /&gt;firstname, &lt;br /&gt;lastname, &lt;br /&gt;teamname &lt;br /&gt;from players, teams, playersonteams &lt;br /&gt;where &lt;br /&gt;playerid = pid &lt;br /&gt;and teamid = tid &lt;br /&gt;&lt;br /&gt;This is an easy habit to get into, especially when the mysql manual uses it in most of their examples (and I'd say that is unfortunate as it promotes bad habits). The problem with using list syntax is that it is not as clear to see what tables are joined on what clause. It is also possible, when getting into such a habit, to mix the list syntax and the ON clause syntax when writing more complicated joins. It is also possible to mix a condition into the where clause of such joins when it actually belongs in the ON clause instead.</description><link>http://www.dwhelpdesk.com/2008/09/basic-joins.html</link><author>noreply@blogger.com (DW Helpdesk)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-8710553421145122378.post-6042610629920471324</guid><pubDate>Fri, 12 Sep 2008 15:02:00 +0000</pubDate><atom:updated>2008-09-12T08:03:09.719-07:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Oracle</category><category domain='http://www.blogger.com/atom/ns#'>SQL</category><title>Find min, max value for similar columns across a shema</title><description>SELECT    'SELECT '''&lt;br /&gt;       || table_name&lt;br /&gt;       || ''', '''&lt;br /&gt;       || column_name&lt;br /&gt;       || ''', MIN(LENGTH('&lt;br /&gt;       || column_name&lt;br /&gt;       || '))  AS MIN, MAX(LENGTH('&lt;br /&gt;       || column_name&lt;br /&gt;       || '))  AS MAX FROM '&lt;br /&gt;       || table_name&lt;br /&gt;       || ' UNION ALL' AS "--QUERY"&lt;br /&gt;  FROM all_tab_cols&lt;br /&gt; WHERE owner = 'OWNER' AND column_name LIKE 'COL%'&lt;br /&gt;       AND table_name NOT LIKE 'VIEW_%'</description><link>http://www.dwhelpdesk.com/2008/09/find-min-max-value-for-similar-columns.html</link><author>noreply@blogger.com (DW Helpdesk)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-8710553421145122378.post-6593909873061679975</guid><pubDate>Thu, 11 Sep 2008 03:00:00 +0000</pubDate><atom:updated>2008-09-12T12:44:02.776-07:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Informatica</category><title>Getting real source to target dependency</title><description>PowerCenter Metadata Reporter provides many standard reports to analyze the repository. The source to target dependency report outlines for each mapping which source fields are going into the target. Although the report is great, it doesn’t show all source fields that have been used in the data flow. Or in other words: all source fields that left the source qualifier. Typical examples are ID fields that may “disappear” in active transformations like Filters, Lookups, Joiners, etc. Therefore, I put my hands on SQL to get the wanted result.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;select distinct rep_reposit_info.repository_name, rep_fld_mapping.subject_area, rep_fld_mapping.mapping_name, rep_fld_mapping.source_name, rep_fld_mapping.source_field_name, rep_fld_mapping.target_name, rep_fld_mapping.target_column_name as target_field_name&lt;br /&gt;from rep_fld_mapping, rep_reposit_info&lt;br /&gt;&lt;br /&gt;union&lt;br /&gt;&lt;br /&gt;select distinct temp4.repository_name, temp2.subject_area, temp3.mapping_name, temp2.source_name, temp2.source_field_name, null as target_name, null as target_field_name&lt;br /&gt;from (&lt;br /&gt;      select distinct temp1a.mapping_id ,temp1a.widget_id, temp1a.from_field_id&lt;br /&gt;      from (&lt;br /&gt;            select rep_widget_dep.from_instance_id, rep_widget_dep.from_field_id,&lt;br /&gt;            rep_widget_dep.to_instance_id, rep_widget_dep.to_field_id,&lt;br /&gt;            rep_widget_inst.mapping_id, rep_widget_inst.widget_id&lt;br /&gt;            from rep_widget_inst inner join rep_widget_dep on (rep_widget_inst.mapping_id=&lt;br /&gt;            rep_widget_dep.mapping_id and rep_widget_inst.instance_id=&lt;br /&gt;            rep_widget_dep.from_instance_id)&lt;br /&gt;            where rep_widget_inst.widget_type=1&lt;br /&gt;            ) temp1a,&lt;br /&gt;&lt;br /&gt;            (&lt;br /&gt;            select distinct rep_widget_dep.from_instance_id, rep_widget_dep.from_field_id&lt;br /&gt;            from rep_widget_inst inner join rep_widget_dep on (rep_widget_inst.mapping_id=&lt;br /&gt;            rep_widget_dep.mapping_id and rep_widget_inst.instance_id=&lt;br /&gt;            rep_widget_dep.from_instance_id)&lt;br /&gt;            where rep_widget_inst.widget_type=3&lt;br /&gt;            ) temp1b&lt;br /&gt;&lt;br /&gt;      where temp1a.to_instance_id=temp1b.from_instance_id &lt;br /&gt;      and temp1a.to_field_id=temp1b.from_field_id&lt;br /&gt;      ) temp1&lt;br /&gt;&lt;br /&gt;left join rep_all_source_flds temp2 on (temp1.from_field_id=temp2.source_field_id)&lt;br /&gt;inner join rep_all_mappings temp3 on (temp1.mapping_id=temp3.mapping_id),&lt;br /&gt;rep_reposit_info temp4&lt;br /&gt;where temp2.source_id not in (&lt;br /&gt;                              select rep_fld_mapping.source_id&lt;br /&gt;                              from rep_fld_mapping&lt;br /&gt;                              )&lt;br /&gt;&lt;br /&gt; Note: SQL statement has been developed and tested with PowerCenter 7.1.2 repository (on Oracle). I recommend executing the query in PowerCenter Metadata Reporter (runs on PowerAnalyzer). Depending on the amount of objects in your repository, you are doing well in defining a filter (e.g. a specific folder) since the query is designed to run over the whole repository.</description><link>http://www.dwhelpdesk.com/2008/09/getting-real-source-to-target.html</link><author>noreply@blogger.com (DW Helpdesk)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-8710553421145122378.post-6925425698647175699</guid><pubDate>Wed, 10 Sep 2008 03:45:00 +0000</pubDate><atom:updated>2008-09-10T20:02:18.700-07:00</atom:updated><title>What is DW Helpdesk?</title><description>What is DW Helpdesk?</description><link>http://www.dwhelpdesk.com/2008/09/what-is-dw-helpdesk.html</link><author>noreply@blogger.com (DW Helpdesk)</author></item></channel></rss>