My DOUBT ..Please clarify

  • I am beginner of SQL.When i am using the (ed) command to open the buffer area,it was showing the error asa nothing to save.What should i do???

    SQL> show user;

    USER is "SCOTT"

    SQL> ed

    SP2-0107: Nothing to save.

    PLease anyone clarify the doubt.....

  • Hi

    This is primarily a Microsoft SQL Server forum not an Oracle forum.

    I dont know about the (ed) command, but your creat table is invalid syntax, it should be CREATE TABLE

  • You have typos in your commands. "se;ec" should be "select", and "creat" should be "create". At the very least, you need to fix those. Try again after fixing the typos, see what you get.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • Now I'm curious. What is the "ed" command?

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • Though I am a SQL Server geek...still answering this 😉

    "ed" is used in ORACLE on command-line-interface to open the current running query in editor.

    -Lokesh :smooooth:

    ~ Lokesh Vij


    Guidelines for quicker answers on T-SQL question[/url]
    Guidelines for answers on Performance questions

    Link to my Blog Post --> www.SQLPathy.com[/url]

    Follow me @Twitter

  • Thank you, Lokesh. @=) Much appreciated.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • You are welcome Brandie 🙂

    ~ Lokesh Vij


    Guidelines for quicker answers on T-SQL question[/url]
    Guidelines for answers on Performance questions

    Link to my Blog Post --> www.SQLPathy.com[/url]

    Follow me @Twitter

  • Thanks for your replies.But please help me in opening of the present query by using (ed) command;.....

  • Looking at SQLCMD help I found this:

    Editing Commands

    [:] ED

    Starts the text editor. This editor can be used to edit the current Transact-SQL batch, or the last executed batch. To edit the last executed batch, the ED command must be typed immediately after the last batch has completed execution.

    Based on this, maybe there is no batch to edit.

  • johnydiol143 (7/23/2012)


    Thanks for your replies.But please help me in opening of the present query by using (ed) command;.....

    You'll need to look at the Oracle documentation for that. This website is for Microsoft SQL, not Oracle.

    I suggest starting here: http://docs.oracle.com/cd/B25329_01/doc/appdev.102/b25108/xedev_sqlplus.htm

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • GSquared (7/23/2012)


    johnydiol143 (7/23/2012)


    Thanks for your replies.But please help me in opening of the present query by using (ed) command;.....

    You'll need to look at the Oracle documentation for that. This website is for Microsoft SQL, not Oracle.

    I suggest starting here: http://docs.oracle.com/cd/B25329_01/doc/appdev.102/b25108/xedev_sqlplus.htm

    ED is also the EDIT command when you run SQLCMD at the command line.

  • Lynn Pettis (7/23/2012)


    GSquared (7/23/2012)


    johnydiol143 (7/23/2012)


    Thanks for your replies.But please help me in opening of the present query by using (ed) command;.....

    You'll need to look at the Oracle documentation for that. This website is for Microsoft SQL, not Oracle.

    I suggest starting here: http://docs.oracle.com/cd/B25329_01/doc/appdev.102/b25108/xedev_sqlplus.htm

    ED is also the EDIT command when you run SQLCMD at the command line.

    Yes, but judging by the rest of the original question (the SQL> on each line, for example), it looks more like the Oracle implementation.

    I still think the problem is the typos and errors in the query. The error on ED was "nothing to show", because there isn't a query in the line above it, there's an error.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • Possibly. Is there a way to modify the prompt in SQLCMD?

  • More so as SHOW USER returns an error in SQLCMD.

    So yes, check the Oracle documentation, it may provide better answers than we can give you.

Viewing 14 posts - 1 through 13 (of 13 total)

You must be logged in to reply to this topic. Login to reply