Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 Other Topics
 Adding Comments in SQL

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-06-12 : 09:54:59
siva writes "Here is the contents of my SQL file:
spool d:/spool.sql

select 'COMMENT ON TABLE '||TABLE_NAME||' IS '||COMMENTS FROM TAB_COMMENTS;

SPOOL OFF;


Output is:


COMMENT ON TABLE MM_OBJ_SP IS Material Item Specifications

I want the Following output instead of the above one

COMMENT ON TABLE MM_OBJ_SP IS ‘Material Item Specifications’;

What modification i need to do in the sql file to get my expected output."

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-06-12 : 10:41:21
Post your question at Oracle Forums
www.DBForums.com
www.OraFAQ.com

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2006-06-12 : 11:36:07
Maddy,

Same idea

SELECT 'COMMENT ON TABLE '||TABLE_NAME||' IS '''||COMMENTS||'''' FROM TAB_COMMENTS;



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-06-13 : 02:04:59
quote:
Originally posted by X002548

Maddy,

Same idea

SELECT 'COMMENT ON TABLE '||TABLE_NAME||' IS '''||COMMENTS||'''' FROM TAB_COMMENTS;



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Yes it is

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -