Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retrieving Large View DDL

Status
Not open for further replies.

puhl64

MIS
Jul 1, 2002
6
0
0
US
Hi All...

I am running V2R4 and I have a long view.

When I execute the "show view", i am only getting back half the DDL. I read that the "Show" will only return 12500 characters. Since I need to modify this view, how can I get the full DDL back quickly?

Thanx!

Rich

(I know, I have to change the spaces at the end of each line to nulls -- i'll do it when i make my changes!)
 
Try this.

select requesttext from dbc.tables where tablekind='V' and tablename='view_name'.
 
If the same view name exists in multiple databases you can try this.
select requesttext from dbc.tables where tablekind='V' and tablename='view_name' and databasename='database_name'.
 
Thank you for your help....

Unfortunately, it still only returns half the View.

I could use another suggestion!

Rich
 
There's a reason why it's recommended to store source code in a flat file ;-)

You created that view sucessfully?
So there's source code stored in dbc.CreateText, but it's not the code you submitted, it's a version with fully qualified column names, e.g.

sel createtext
from dbc.tvm
where tvmname = 'dbcinfo';

CREATE VIEW "DBC"."DBCInfo" AS SELECT "DBC"."DBCInfoTbl"."InfoKey" ,"DBC"."DBCInfoTbl"."InfoData" FROM "DBC"."DBCInfoTbl" WITH CHECK OPTION ;


In V2R4.1 you can retrieve the createtext by submitting a
SHOW QUALIFIED sel * from ...

And V2R5 stores up to 1 MB source code...

Dieter
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top