help for a former sybase user

From: <davidsonj_at_gtewd.mtv.gtegsc.com>
Date: 20 Sep 93 23:18:40 -0800
Message-ID: <1993Sep20.231840.733_at_gtewd.mtv.gtegsc.com>


Having used Sybase on a recent project and now using Oracle I have had a little difficulty with a couple of things. Could someone tell me.....

  1. Why doesn't oracle PL/SQL allow a select that includes both a column and an aggregate function. Specifically, I am trying to SELECT NAME, COUNT(*) from a table containing a list of names. I get the error indicating that the name is "not a single-group group function" (error #00937). Sybase allows this returning each of the individual rows (i.e., names) along with a count reflecting the total number of rows in the table. (Note: the count is returned with each row - each row having the same value.) Also - don't suggest the %ROWCOUNT qualifier since I am using a cursor and the %ROWCOUNT doesn't tell you the total number of rows until you have fetched them all....I want the count prior to fetching so I can allocate the necessary space.

    Looking at the Sybase documentation, they indicate that their     implementation, "similar to other implementations", extends the     SQL standard to allow the above type of selects. I guess I don't     see why Oracle's implementation doesn't allow this too - I found     it very useful.

2) I am also interested in a tool that would allow me to test my

    SQL commands. Currently I have to put the sql command into a file,     execute the file from SQLPLUS using the _at_filename command, and then     re-edit the file to make corrections. For those of you that have     seen it - I really liked Sybase's Data Workbench - that provided a     crude screen editor to enter a SQL command (or series of commands),     edit them, execute them, examine the results, edit the commands     again, save them to a file (at any time), and reload the file (at     any time). This was a great way to work out the SQL syntax for     some of the nastier queries. There was also a very nice interactive     (motif based) capability for building select commands (but not     update/inserts/etc for some reason) where you could select the table     from a list (which could be restricted based on at least owner),     then select the fields in the select, add necessary clauses, and     again try this all out interactively. Anyway, is there any     equivalent for ORACLE????????

Thanks for any help,

     jim

p.s. Don't get the impression that I wish I was still using Sybase - there

      are features of Oracle that I like - these are just 2 that I liked
      better about Sybase.
Received on Tue Sep 21 1993 - 09:18:40 CEST

Original text of this message