In a message dated 01-06-20 07:30 EDT, you write:
Is there some way to populate the description field for an object in
Designer by writing an SQL statement. FOr example if I have all the descriptions in a column called DESC in the DESCRIPTION TABLE in Oracle and want to Populate my the Objects’s description in Designer.
Something like select DESC from DESCRIPTION TABLE into… Bo Description field…
The answer is (shhhh, tech support may be listening… ) yes, but it is not a supported solution. If you perform any operation other than selecting from the repository, then you have probably voided your support contract. Having said that…
The answer is not as simple as a select into. For one thing, the help text in the universe is broken up into chunks. So if your source data is longer than the size of the “slice” that BusObj uses, then you will truncate values. Because of the processing required, you are better off using a procedural language rather than basic SQL.
Since you mentioned Oracle, I will post the framework of a script that I used at a client site. I have to say this: use at your own risk. You would be best to create a backup copy of your repository and test thoroughly in your environment before making any attempt to do this.
In fact, I would load the help text into a test repository, build a BOMain key for that repository, and import the universe into designer. If the import doesn’t blow up, then check the help text. Check the SQL code too to make sure it didn’t get corrupted. Then and only then consider exporting your new version of the universe to a production repository. Also note that this script does NOT append to any predefined help text, you should delete any help text already defined in your universe to use this script. I had strange results when I tried to append to existing help, so I went that route to get the job done.
As I say, use at your own risk.
A better way to do this would be to extract the help text from your Oracle tables into a text file, and write a VBA macro to populate the text via the Designer SDK. I am working on this. In my spare time. Ha.
Regards,
Dave Rathbun
Integra Solutions
www.islink.com
begin
declare cursor c_help_text IS
select help_text,
upper(column_name),
upper(table_name)
from your_help_table_here
where
-- insert where clause as desired
;
v_help_text varchar2(2000); -- allow for help up to 2000 char long
v_help_column varchar2(35);
v_help_table varchar2(30);
v_help_slice varchar2(240); -- BusObj help is 240 chars long
v_slice_num number := 1;
v_line_ctr number := 1;
begin
open c_help_text;
loop
fetch c_help_text into v_help_text, v_help_column, v_help_table; exit when c_help_text%notfound;
v_line_ctr := v_line_ctr + 1;
v_slice_num := 1;
while length(rtrim(v_help_text))>0 loop
-- insert the first 240 characters
v_help_slice := substr(v_help_text,1,240);
-- and get the rest of the string
v_help_text := substr(v_help_text,241);
insert into bo_unv_object_data values
(v_help_table||'.'||v_help_column, 'H', v_slice_num, v_help_slice);
v_slice_num := v_slice_num + 1;
end loop;
end loop;
commit;
end;
end;
/
Listserv Archives (BOB member since 2002-06-25)