Fellow Bobber's come on in. This is a community site to ask and share your knowledge about almost anything.
 
HomePortalCalendarGalleryFAQSearchMemberlistUsergroupsRegisterLog in

Share
 

 test blog only

Go down 
AuthorMessage
guest
Guest
avatar


test blog only Empty
20091023
Posttest blog only

test blog only
set linesize 400
set heading off
set pagesize 9999
select column_name
,data_type
,len
,start_pos
,end_pos
,(case when (data_type='CHAR' or data_type='VARCHAR2')
then ','||lower(column_name)||' '||'position('||start_pos||':'||end_pos||')'
when data_type='NUMBER'
then ','||lower(column_name)||' '||'position('||start_pos||':'||end_pos||')
integer external defaultif ('||st!art_pos||':'||end_pos||')=blanks'
when data_type='DATE'
then ','||lower(column_name)||' '||'position('||start_pos||':'||end_pos||') date nullif
('||start_pos||':'||end_pos||')=blanks' end) as scr
from (select column_name, data_type, len, ((end_pos-len)+1) as start_pos, end_pos
from (select column_name, data_Type, len, sum(len) over (order by column_id) as end_pos
from (select column_name
,column_id
,substr(data_type,1,10) data_Type
,decode(data_type,
'NUMBER',(case when length(column_name) <= 10
then 10
when length(column_name) > 10
then length(column_name)
! ! end)
,'CHAR',data_length
,'DATE',length(sysdate)) as len
from user_tab_cols
where table_name='&table_name'
order by column_id)));
Back to top Go down

 Similar topics

-
» Hi from Wollongong
» Lesson Plan : Back to Nature by Mrs. Kobzili Z.
» The 007 test
» Blog Post: Don't Rely on Lineage - from Vishvapani
» 3rd Term Test
Share this post on: diggdeliciousredditstumbleuponslashdotyahoogooglelive

test blog only :: Comments

No Comment.
 

test blog only

Back to top 

Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
 :: Blogs-
Jump to: