The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Double quotes or single quotes when using ssh? password636 Shell Programming and Scripting 3 05-29-2008 08:52 PM
awk to print ' (single quotes) orahi001 UNIX for Dummies Questions & Answers 2 03-11-2008 04:30 PM
Help Please. Need to add quotes to o field tjbopp Shell Programming and Scripting 13 02-10-2006 04:52 PM
I want the output within quotes gopskrish UNIX for Dummies Questions & Answers 5 06-24-2005 10:17 AM
quotes wannabe_guru UNIX for Dummies Questions & Answers 4 04-12-2004 09:25 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-08-2007
agarwalniru agarwalniru is offline
Registered User
  
 

Join Date: May 2007
Posts: 11
how to put quotes ina .sql file

Hi i am new on Unix..........
I have to write a ddl and for tables and I am using single quotes in the comment for the table and its column...........but when i see on the unix server the ' dont show .

e.g. DROP TABLE DMR_PURGED;

CREATE TABLE DMR_PURGED
(
HEALTH_SERVICE_ID NUMBER(20) NOT NULL,
HEALTH_SERVICE_ITEM_NO NUMBER(2) NOT NULL,
SYSTEM_CD VARCHAR(2) NOT NULL,
PURGED_DT DATE NOT NULL,
REC_CREATE_TIMESTAMP DATE NOT NULL
);

COMMENT ON TABLE DMR_PURGED IS 'This stores purged member claims from PBS';

COMMENT ON COLUMN DMR_PURGED.HEALTH_SERVICE_ID IS 'Health Service ID';

COMMENT ON COLUMN DMR_PURGED.HEALTH_SERVICE_ITEM_NO IS 'Health Service Item Number';

COMMENT ON COLUMN DMR_PURGED.SYSTEM_CD IS 'System Code';

COMMENT ON COLUMN DMR_PURGED.PURGED_DT IS 'Purged Date';

COMMENT ON COLUMN DMR_PURGED.REC_CREATE_TIMESTAMP IS 'Record Create Timestamp';


CREATE OR REPLACE TRIGGER TRG_DMR_PURGED_TS
BEFORE UPDATE OR INSERT
ON DMR_PURGED
FOR EACH ROW
BEGIN

the comment line quotes either dont show or comes out as special character........plz help
  #2 (permalink)  
Old 06-08-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
How are you composing the file?

If you edit the file on the UNIX box with vi does the problem go away?
  #3 (permalink)  
Old 06-08-2007
agarwalniru agarwalniru is offline
Registered User
  
 

Join Date: May 2007
Posts: 11
Quote:
Originally Posted by porter
How are you composing the file?

If you edit the file on the UNIX box with vi does the problem go away?

thats the whole problem......i m trying to edit it via Vi editor on unix and it doesnt let me edit.
so i making the changes ona notepad and FTP on unix....it still gives special characters in place of quotes
  #4 (permalink)  
Old 06-09-2007
solfreak's Avatar
solfreak solfreak is offline
Registered User
  
 

Join Date: Jun 2007
Posts: 35
Quote:
Originally Posted by agarwalniru
thats the whole problem......i m trying to edit it via Vi editor on unix and it doesnt let me edit.
so i making the changes ona notepad and FTP on unix....it still gives special characters in place of quotes
On the unix machine try:
tr -d '\r' < file.txt > file
  #5 (permalink)  
Old 06-09-2007
Shell_Life's Avatar
Shell_Life Shell_Life is offline
Registered User
  
 

Join Date: Mar 2007
Location: Bahia, Brazil
Posts: 695
Agarwalniru,
If you have the text in Notepad, the quick solution is to just
copy and paste it to unix vi.
  #6 (permalink)  
Old 06-11-2007
agarwalniru agarwalniru is offline
Registered User
  
 

Join Date: May 2007
Posts: 11
Pasting in Vi didnt help .......it showed . in place of ' .........so i edited my script in Vi, i did not know how to use Vi , But i just now figured it out
But i really appreciate your help!!! thanks!!
  #7 (permalink)  
Old 06-09-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
Quote:
Originally Posted by agarwalniru
Vi editor on unix and it doesnt let me edit.
Do you know how to use vi?

What are the files attributes, is it read-only?

How does vi complain?

What about nano, emacs or any other editor you have?

What about a text editor running under "X"?

What languages/code pages/character sets etc is your Windows box using?
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:43 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0