亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊(cè) 查看新帖 |

Chinaunix

  平臺(tái) 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 1991 | 回復(fù): 5
打印 上一主題 下一主題

edit問題 [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報(bào)告]
發(fā)表于 2003-07-07 16:14 |只看該作者 |倒序?yàn)g覽
我使用的是oracle8.1.7,平臺(tái)是windows2000.在SQL*PLUS中使用edit
命令編輯命令以后,始終出現(xiàn)錯(cuò)誤,為什么?

SQL>; show echo
echo OFF
SQL>; edit
已寫入文件 afiedt.buf

  1*  SET ECHO OFF
SQL>; /
SET ECHO OFF
     *
ERROR 位于第 1 行:
ORA-00922: 缺少或無效選項(xiàng)


SQL>; set echo on
SQL>; show echo
echo ON

在edit打開的notepad中的內(nèi)容是:
SET ECHO OFF
/


求高手指點(diǎn)

論壇徽章:
0
2 [報(bào)告]
發(fā)表于 2003-07-07 16:26 |只看該作者

edit問題

實(shí)驗(yàn)證明,在edit中設(shè)置這些確實(shí)不行,但是一般的select卻是可以使用的  

那位大蝦能不能解釋一下啊

論壇徽章:
0
3 [報(bào)告]
發(fā)表于 2003-07-07 16:27 |只看該作者

edit問題

再貼一個(gè)關(guān)于sqlplus的簡(jiǎn)單介紹

SQL Plus Commands
[Introduction |Line Editing |Using Notepad for editing |Sending results to a file |Retrieving a file ]
Introduction
At the SQL prompt, you can begin typing any SQL command. Upon hitting return (i.e., enter key) the SQL prompt will change to line number prompts. When you are finished typing a command, type / or RUN to execute the SQL command. Also, a semicolon at the end of the SQL command will execute the command immediately after hitting return. In addition to SQL commands, /, and RUN, other commands can be issued at the SQL prompt (a semicolon does not have to follow the nonSQL commands).
DESCRIBE tablename--lists the attributes and their specifications of tablename
EDIT--Places you in an editor (Notepad). The buffer contents are put into the editor
GET filename--Retrieves a file and places it into the buffer
SAVE filename--Saves the buffer to the name file
CLEAR BUFFER--Clears the buffer

--------------------------------------------------------------------------------

Line Editing
One way to change an SQL statement in the buffer is by using the line editor. The following are a list of line edit commands.
LIST or L--Lists the contents of the buffer
LIST n or L n--Lists the contents of line number n in the buffer and makes the line current
LIST * or L *--Lists the current line
LIST m n--Lists the range from m to n line
Append text or A text--Adds to the end of the current line (e.g., "A ," adds a comma to the end of line
INPUT or I--Adds one or more lines after the current line so you can begin adding the text.
CHANGE /text--Deletes text from the current line
CHANGE /oldtext/newtext--Replaces oldtext with newtext in the current line
DEL -- Deletes the current line
Using Notepad for Editing
You can use Notepad to edit the contents of the buffer. There are two ways to enter Notepad.
Use the menus Edit/editor/invoke. In addition here, you can use Edit/editor/define to change the editor. You might check Edit/editor/define prior to editing a buffer to make sure it is set up the way you would like.
Type Edit at the SQL Prompt
When you are finished editing, click on File/exit (in Notepad). Next, type GET buffername at the SQL prompt. The buffer name will be listed a few lines up in SQL Plus upon returning to SQL Plus. Type RUN, to execute the command.
Notepad can also be used to save the buffer contents. Use File/Save As to create a permanent file.

Multiple SQL commands can be typed in Notepad. End each SQL command (except the last one) with a semicolon. After exiting notepad, type Start buffername instead of GET buffername to run all of the commands. Start filename can also be used to execute SQL command that are stored in a file.

Sending the Results to a File
To send queries and their results to a file for later printing (e.g., turning in homework assigments), the spool command is used. On the menu go to FILE/Spool to begin spooling--it will ask for a file name. To quit spooling, go to FILE/Spool and then click on end Spool.
Retrieving a File
To retrieve SQL command from a file use GET filename or START filename. GET filename places the file into the buffer. START filename executes the commands in the file.

論壇徽章:
0
4 [報(bào)告]
發(fā)表于 2003-07-07 16:44 |只看該作者

edit問題

發(fā)現(xiàn)使用腳本文件卻是可以的:
SQL>;EDIT 1.SQL
然后把
SET ECHO OFF
SELECT語句寫入
保存
SQL>;START 1.SQL
......


執(zhí)行是正確的,WHY?

論壇徽章:
0
5 [報(bào)告]
發(fā)表于 2003-07-07 16:53 |只看該作者

edit問題

/
專門用來執(zhí)行sql語句用的
而類似于 set.desc.help等實(shí)際上是
sqlplus的命令

所以,是不能通過 /來執(zhí)行的

你可以直接鍵入
或者通過
@afiedt.buf
來達(dá)到你所需要的效果

ps.我通常會(huì)設(shè)置
set editfile=.sql
define _EDITOR=vi

ed之后
用 @.sql
來執(zhí)行!

論壇徽章:
0
6 [報(bào)告]
發(fā)表于 2003-07-07 17:09 |只看該作者

edit問題

多謝了,這么說是 / 的原因了
您需要登錄后才可以回帖 登錄 | 注冊(cè)

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號(hào)-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號(hào):11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報(bào)專區(qū)
中國(guó)互聯(lián)網(wǎng)協(xié)會(huì)會(huì)員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請(qǐng)注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP