Column name- desc

hi gems..
cant i use DESC as a column name???
when i was trying to create a table having one of the column name DESC VARCHAR2(250) , then it got failed with invalid identifier error..

No, you cannot use "DESC" as it is a reserve word.
SQL> create table t (desc varchar2(100));
create table t (desc varchar2(100))
ERROR at line 1:
ORA-00904: : invalid identifier
SQL>and not advisable to use mixed case for table/column names.
SQL> create table t ("Desc" varchar2(100));
Table created.
SQL> desc t
Name                                      Null?    Type
Desc                                               VARCHAR2(100)
SQL> select "Desc" from t;
no rows selected
SQL>

Similar Messages

  • Can I create a view based on two tables that have the same column name?

    I have two tables A and B. Each table has 50+ columns.
    I want to create a view that includes all the columns in A and all the columns in B. I created a view with a select statement that says
    Select A.*, B.*
    From A, B
    where A.id = B.id
    It returns an error because in each table I have a column that keeps track if a record has been changed called Modified_By. That's where it chokes up on I figure. I would like to write the view without explicitly writing each column name from A and B as part of the select statement. The actual select statement works fine and only bombs when trying to turn the select statement into a view.

    You will have to type the full column list at least once. You can save a few keystrokes (i.e. alias. on every column) by providing the column names to the CREATE part instead of in the SELECT part. Something like:
    SQL> desc t
    Name                                      Null?    Type
    ID                                                 NUMBER
    NAME                                               VARCHAR2(10)
    SQL> desc t1
    Name                                      Null?    Type
    T_ID                                               NUMBER
    LOC_ID                                             NUMBER
    NAME                                               VARCHAR2(15)
    SQL> CREATE VIEW t_v (id, t_name, t_id, loc_id, t1_name) AS
      2  SELECT t.*, t1.*
      3  FROM t, t1
      4  WHERE t.id = t1.t_id;
    View created.HTH
    John

  • ORA-00904: invalid column name in select query by using abstract datatype

    Hi,
    I had created abstract datatype as PERSON_TY and ADDRESS_TY ,
    after inserting the record . i'm tryng to select the column but i got the error , even i refferd all those thing. they are given that same please look this finde me a result.
    SQL> DESC PERSON_TY
    Name Null? Type
    NAME VARCHAR2(25)
    ADDRESS ADDRESS_TY
    SQL> DESC ADDRESS_TY
    Name Null? Type
    STREET VARCHAR2(30)
    CITY VARCHAR2(25)
    STATE CHAR(2)
    COUNTRY VARCHAR2(15)
    SQL> SELECT * FROM EMPLOYE
    2 ;
    EMP_CODE
    PERSON(NAME, ADDRESS(STREET, CITY, STATE, COUNTRY))
    10
    PERSON_TY('VENKAT', ADDRESS_TY('112: BLUE MOUNT', 'CHENNAI', 'TN', 'INDIA'))
    20
    PERSON_TY('SRINI', ADDRESS_TY('144: GREEN GARDEN', 'THAMBARAM', 'TN', 'INDIA'))
    SQL> SELECT PERSON.NAME FROM EMPLOYE
    2 ;
    SELECT PERSON.NAME FROM EMPLOYE
    ERROR at line 1:
    ORA-00904: invalid column name
    regards
    venki

    SELECT PERSON.NAME FROM EMPLOYEIf you look in the documentation, you will see that we need to alias the table in order to make this work:
    select e.person.name from employees e
    /Cheers, APC
    Blog : http://radiofreetooting.blogspot.com

  • Column name in user_ind_columns, all_ind_columns

    The oracle data dictionary seems to assign a new system generated name (for example 'SYS_NC00008$') to index columns where the descend value = 'DESC';
    SQL> select index_name, index_owner, column_name, descend from all_ind_columns
    where descend = 'DESC';
    INDEX_NAME INDEX_OWNER
    COLUMN_NAME
    DESC
    MY_INDEX MY_OWNER
    SYS_NC00008$
    DESC
    1 row selected.
    is there a way to get the proper column name through a join to another table?
    This is what I tried
    SQL> select a.index_name, a.index_owner, a.table_name, b.column_name, a.descend
    from all_ind_columns a, user_tab_columns b
    where a.table_name = b.table_name and a.column_name = b.column_name and a.descend = 'DESC';
    no rows selected
    Is this fixed in 9i?
    Thanks in advance,
    David Wilson.

    I get exactly the same results in both 9.0.1 and 9.2.0, so it is unchanged in 9i. However, it is not a bug, so it will not be fixed. The reason you get the system generated name with a DESC index is that Oracle implements it as a function based index.
    If you really need the "real" column name, it is in the default$ column of sys.col$.
    I suppose you could add that column to a custom version of the xxx_ind_columns views if you really needed it.
    TTFN
    John

  • Unknown column name: annee

    Hi,
    I have a error message.
    My request is good but in my program java, annee is a unknown column name.
    SELECT DISTINCT round(wbdate/10000,0) AS annee FROM EUROF400.FICLIB.IE02 WHERE WBETAT=:etat ORDER BY annee DESC
    String l_annee=mod.getIe0211().getBigDecimal("annee").toString();
    Thanks in advance

    SELECT DISTINCT round(wbdate/10000,0) AS annee FROM
    EUROF400.FICLIB.IE02 WHERE WBETAT=:etat ORDER BY annee
    DESC
    There are some JDBC drivers which will not return the column alias.
    String
    l_annee=mod.getIe0211().getBigDecimal("annee").toString
    );I'd be carefull with that. If getBigDecimal returns null (because wbdate is null) then you'll get a NullPointerException.
    mod.getIe0211().getString(1) is probably the safest way to do it.
    Thomas

  • Dual Case Column names fail in select ORDER BY clause

    This one is solved, but I thought someone might be able to explain why it happens.
    I'm a newbie, since I just downloaded Oracel XE last night, and am trying it out.
    I set up a trivial table with 4 text columns. As it happened, I used dual case for some of my column names, such as 'Nickname'.
    When trying out the Query Builder, the Select statement failed whenever I added a sort.
    After some head scratching and back-and-forth with the sample data base (HR), I finally renamed all the columns to upper case. (e.g. column 'Nickname' became 'NICKNAME'). Then it works.
    Seems like a bug, but maybe it's just a feature. Here's the code generated by the Query Builder. As you can see, there are no quotes around the Table name or column names in the ORDER BY clause (and the dual case version of the column name works if I put the quotes in manually and run it with SQL command.) Seems quirky.
    select     "TEAMS"."NICKNAME" as "NICKNAME",
         "TEAMS"."CITY" as "CITY",
         "TEAMS"."DIVISION" as "DIVISION",
         "TEAMS"."CONFERENCE" as "CONFERENCE"
    from     "TEAMS" "TEAMS"
    order by TEAMS.NICKNAME ASC

    Welcome to forum. :)
    Now, answering your question - no i don't think this is a bug.
    It is your code - which create this bug.
    Now, question is - what happen?
    Just check your select and from clause. You put all the names are in double quote. When you put anything within double quotes - it become a case sensitive. So, the problem occurs there.
    Let's see ->
    satyaki>
    satyaki>select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    Elapsed: 00:00:01.11
    satyaki>
    satyaki>create table s_otn
      2      (
      3        id    number(4)
      4      );
    Table created.
    Elapsed: 00:00:02.14
    satyaki>
    satyaki>set lin 80
    satyaki>
    satyaki>desc s_otn;
    Name                                      Null?    Type
    ID                                                 NUMBER(4)
    satyaki>
    satyaki>desc S_OTN;
    Name                                      Null?    Type
    ID                                                 NUMBER(4)
    satyaki>
    satyaki>desc s_OtN;
    Name                                      Null?    Type
    ID                                                 NUMBER(4)
    satyaki>
    satyaki>drop table s_otn;
    Table dropped.
    Elapsed: 00:00:05.22
    satyaki>
    satyaki>
    satyaki>create table "S_otn"  
      2       (
      3         id     number(4)
      4       );
    Table created.
    Elapsed: 00:00:00.12
    satyaki>
    satyaki>
    satyaki>desc S_otn;
    ERROR:
    ORA-04043: object S_otn does not exist
    satyaki>
    satyaki>desc S_OTN;
    ERROR:
    ORA-04043: object S_OTN does not exist
    satyaki>
    satyaki>desc s_otn;
    ERROR:
    ORA-04043: object s_otn does not exist
    satyaki>
    satyaki>desc "S_OTN";
    ERROR:
    ORA-04043: object "S_OTN" does not exist
    satyaki>
    satyaki>desc "S_otn";
    Name                                      Null?    Type
    ID                                                 NUMBER(4)
    satyaki>Got me?
    Regards.
    Satyaki De.

  • How To Create Table View With Same Column name But Different Table?

    Hi All,
    I have the problem to create a tableview with same column name but in different table.
    The Table that i have:-
    Table - PAC051MPROFORMA
    Column - mrn,visitid
    Table - PAC051TPROFORMA
    Column - mrn,visitid
    Table - PAC052MTRANSBILL
    Column - mrn,visitid
    Then i want to create a table view to view that table. This is my SQL
    CREATE VIEW pacviewproforma (mrn,visitid,mrn,visitid,mrn,visitid)
    As Select PAC051MPROFORMA.mrn,PAC051MPROFORMA.visitid,PAC051TPROFORMA.mrn,PAC051TPROFORMA.visitid,PAC052MTRANSBILL.mrn,PAC052MTRANSBILL.visitid
    where
    *(a.PAC051MPROFORMA.mrn=PAC051TPROFORMA.mrn)*
    and
    *(a.PAC051TPROFORMA.mrn=PAC052TRANSBILL.mrn)*
    That SQL Return this error = ORA-00957: duplicate column name
    Then I modify that SQL to
    CREATE VIEW pacviewproforma (mrn,visitid)
    As Select PAC051MPROFORMA.mrn,PAC051MPROFORMA.visitid,PAC051TPROFORMA.mrn,PAC051TPROFORMA.visitid,PAC052MTRANSBILL.mrn,PAC052MTRANSBILL.visitid
    where
    *(a.PAC051MPROFORMA.mrn=PAC051TPROFORMA.mrn)*
    and
    *(a.PAC051TPROFORMA.mrn=PAC052TRANSBILL.mrn)*
    This time this error return = ORA-01730: invalid number of column names specified
    What should i do?
    Thanks...

    Hi,
    SQL> CREATE VIEW pacviewproforma (mrn,visitid,mrn,visitid,mrn,visitid)
      2  As Select
      3  PAC051MPROFORMA.mrn,
      4  PAC051MPROFORMA.visitid,
      5  PAC051TPROFORMA.mrn,
      6  PAC051TPROFORMA.visitid,
      7  PAC052MTRANSBILL.mrn,
      8  PAC052MTRANSBILL.visitid
      9  from PAC051MPROFORMA,PAC051TPROFORMA,PAC052MTRANSBILL
    10  where
    11  (PAC051MPROFORMA.mrn=PAC051TPROFORMA.mrn)
    12  and
    13  (PAC051TPROFORMA.mrn=PAC052MTRANSBILL.mrn);
    CREATE VIEW pacviewproforma (mrn,visitid,mrn,visitid,mrn,visitid)
    ERROR at line 1:
    ORA-00957: duplicate column namePlease give different names to each column.
    Something like this..
    SQL> CREATE OR REPLACE VIEW pacviewproforma (MPROFORMA_mrn,MPROFORMA_visitid,TPROFORMA_mrn,TPROFORMA
    _visitid,MTRANSBILL_mrn,MTRANSBILL_visitid)
      2  As Select
      3  PAC051MPROFORMA.mrn,
      4  PAC051MPROFORMA.visitid,
      5  PAC051TPROFORMA.mrn,
      6  PAC051TPROFORMA.visitid,
      7  PAC052MTRANSBILL.mrn,
      8  PAC052MTRANSBILL.visitid
      9  from PAC051MPROFORMA,PAC051TPROFORMA,PAC052MTRANSBILL
    10  where
    11  (PAC051MPROFORMA.mrn=PAC051TPROFORMA.mrn)
    12  and
    13  (PAC051TPROFORMA.mrn=PAC052MTRANSBILL.mrn);
    View created.
    SQL> DESC  pacviewproforma;
    Name                                      Null?    Type
    MPROFORMA_MRN                                      NUMBER
    MPROFORMA_VISITID                                  NUMBER
    TPROFORMA_MRN                                      NUMBER
    TPROFORMA_VISITID                                  NUMBER
    MTRANSBILL_MRN                                     NUMBER
    MTRANSBILL_VISITID                                 NUMBER
    ORA-01730: invalid number of column names specifiedThe list of column nmae you specified during the CREATE VIEW should match with the SELECT list of the view.
    Twinkle

  • How to know exact column name in following error (oracle9i)

    Hi all,
    Please telll me
    How to know exact column name in following error
    ORA-01401: inserted value too large for column
    Prashant
    null

    If you are running this in your SQL*Plus session then you can easily check it out --
    satyaki>
    satyaki>create table test_sat
      2     as
      3    select empno,ename,job
      4    from emp;
    Table created.
    satyaki>
    satyaki>
    satyaki>desc test_sat;
    Name                                      Null?    Type
    EMPNO                                              NUMBER(4)
    ENAME                                              VARCHAR2(10)
    JOB                                                VARCHAR2(9)
    satyaki>
    satyaki>
    satyaki>
    satyaki>
    satyaki>insert into test_sat values(5555,'Robin','BU');
    1 row created.
    satyaki>
    satyaki>
    satyaki>insert into test_sat values(5555,'Arama Baager Taaja','FR');
    insert into test_sat values(5555,'Arama Baager Taaja','FR')
    ERROR at line 1:
    ORA-01401: inserted value too large for column
    satyaki>insert into test_sat values(55557,'Arama','FR');
    insert into test_sat values(55557,'Arama','FR')
    ERROR at line 1:
    ORA-01438: value larger than specified precision allows for this column
    satyaki>
    satyaki>insert into test_sat values(5555,'Arama','ACCOUNTING');
    insert into test_sat values(5555,'Arama','ACCOUNTING')
    ERROR at line 1:
    ORA-01401: inserted value too large for column
    satyaki>Regards.
    Satyaki De.

  • Rename column name of a table

    Hi Guys,
    I want to rename the column name of a table. Lets say I have table employee:
    SQL> desc emp;
    Name Null? Type
    EMPNO NOT NULL NUMBER(4)
    ENAME VARCHAR2(10)
    JOB VARCHAR2(9)
    MGR NUMBER(4)
    HIREDATE DATE
    SAL NUMBER(7,2)
    COMM NUMBER(7,2)
    DEPTNO NUMBER(2)
    STARS VARCHAR2(8)
    I want to change the name of the cloumn name of ENAME to EMPNAME so that structure looks like this:
    SQL> desc emp;
    Name Null? Type
    EMPNO NOT NULL NUMBER(4)
    EMPNAME VARCHAR2(10)
    JOB VARCHAR2(9)
    MGR NUMBER(4)
    HIREDATE DATE
    SAL NUMBER(7,2)
    COMM NUMBER(7,2)
    DEPTNO NUMBER(2)
    STARS VARCHAR2(8)
    Can anyone tell me any statement or way to solve this problem. Please keep in mind that I will not delete the table or create another column name of EMPNAME and copy the data from ENAME to EMPNAME.
    Regds,
    Debabrata

    ALTER TABLE DEPT2 RENAME COLUMN ENAME TO EMPNAME
    Regards,
    Raj

  • Invalid column name - fixed by inserting a carriage return - Why?

    I'm writing some JSP pages and am executing a statement that retrieves values from three tables.
    When executing the statement I receive the error
    java.sql.SQLException: Invalid column name
    I just want to state here that ALL the column names are definitely correct. I attempted to isolate the problem using my SQL*Plus Interface.
    When copying and pasting the SQL that was used (I put the SQL statement into the HTML to allow me to do this) into SQL*Plus it also come up with the error. I found that if I broke up the statement it would run. Specifically if I placed a carriage return (by hitting enter) prior to the 'A' of the AND operator and then copied and pasted into SQL*Plus it would work!
    I thought the problem was related to bad syntax in the outer join operator. But removal of the outer join operator and making it a EQUI JOIN situation still gave the same results. I tried the use of brackets to 'help' the DB engine figure it out - silly I know, but it didn't work anyway :(
    I've tried this out on UNIX in SQL*Plus where the query was on one line and it worked fine. I've tried it on Oracle 8.1.5 SQL*Plus & Oracle 8.1.7 SQL*Plus on Win2000 and WinNT and no go.
    It has also been tested on an Oracle 7.3.4 DB and no go either.
    Remember I'm only using SQL*Plus to find out why it is not working - I'm actually attempting to execute this via JDBC (classes12.zip Oracle9 version) in my JavaBean. I can't place a carriage return to 'fix' the problem, and I'm assuming that I shouldn't either.
    I've pasted the SQL below (both non-working and working versions). I was going to paste the output of DESC on the associated tables should you too would rule out a mispelled column name, but I didn't want to put anyone off with a long post.
    If you can provide any advice I would be very appreciative.
    Darren James
    Show Me Technology
    SQL> SELECT UNIT.Asset_Number,Model,PERSON.Novell_User_Name FROM
    UNIT, UNIT_USERS, PERSON
    2 WHERE UNIT.Hardware_Reference_Number =
    UNIT_USERS.Hardware_Reference_Number(+) AND UNIT_USERS
    .Novell_User_Name = PERSON.Novell_User_Name (+) ORDER BY Make,
    Model, Asset_Number,Serial_Number,
    UNIT.Hardware_Reference_Number,Unit_Type,PERSON.Last_Name,PERSON.Fi
    rst_Name,PERSON.Novell_User_Name;
    3 /
    WHERE UNIT.Hardware_Reference_Number =
    UNIT_USERS.Hardware_Reference_Number(+) AND UNIT_USERS.Novel
    ERROR at line 2:
    ORA-00904: invalid column name
    REM -- Using the one with an return prior to the AND
    SQL> SELECT UNIT.Asset_Number,Model,PERSON.Novell_User_Name FROM
    UNIT, UNIT_USERS, PERSON
    2 WHERE UNIT.Hardware_Reference_Number =
    UNIT_USERS.Hardware_Reference_Number(+)
    3 AND UNIT_USERS.Novell_User_Name = PERSON.Novell_User_Name
    (+) ORDER BY Make, Model,
    4 Asset_Number,Serial_Number,
    5
    UNIT.Hardware_Reference_Number,Unit_Type,PERSON.Last_Name,PERSON.Fi
    rst_Name,PERSON.Novell_User_
    Name;
    ASSET_NUMBER
    MODEL
    NOVELL_USE
    10023445
    desktop raider
    tabisho
    10023445
    desktop raider
    pjblee
    100349864
    VEi8
    SQL>

    Ok. I feel ashamed that the answer was so simple and not the
    problem I thought it was. But in the interests of perhaps
    preventing someone else doing the same silly thing....
    The error was caused by using a wrong name when 'getting' the
    values int the return ResultSet object. (eg using getString
    ("s.Some_Name") when it should have been getString
    ("s.Another_Name").
    Interestingly the error did occur in one of our SQL*Plus
    versions. Why we still are not sure, but since this was a silly
    error on my part, I'm sure a similarly silly reason will be the
    cause there two.
    I appreciate those who responded though. It is a great resource.
    Darren James
    I'm just guessing here, but could it be some sort of a size thing? Could it be that, if you don't break up line 2, somehow
    it gets truncated or wrapped at an inappropriate place? To test
    this theory, you might try putting the carriage return in front
    of the ORDER BY, instead of in front of the AND, and see if it
    has the same effect. If you do get it figured out, please
    satisfy our curiosity and let us know.

  • Invalid Column Name message in the subquery

    Hi All, I am receiving the invalid column name message in the subquery. Please help me if there is any work around or change in the query:
    Sample query:
    update table1 set table1.column1 =
    (Select column1 from
    (Select column1 from table2 where
    table1.columnX = table2.columnX
    order by table2.columnM desc,table2.ColumnN desc,
    where rownum =1)
    When i run the above query i am receiving the following error message:
    ORA-00904:invalid column name at table1.columnx.
    This column is already existing in table1 and looks like this table is not recoginzed inside of the subquery.
    I am trying to update table1.column1 using the first value from table2 after ordering by table2.columnM desc, table2.columnN desc. (ColumnM and ColumnN are the Date columns which i need to perform the sorting). I am new to sql/Plsql. Thanks in Advance for help....

    The problem is that you can not refer to columns from the outer table from inside a second subquery inside your subquery. Only one level of subquery can be used to transport the column name,.
    A solution can be to use groups and aggregation functions instead of rownum = 1.
    The following might work.
    untested
    update table1
    set table1.column1 =
      (Select max(column1) keep (dense_rank first over table2.columnM desc,table2.ColumnN desc)
       from table2
       where table1.columnX = table2.columnX
       ) Another way can be to to make a UNCORRELATED subquery first and then filter on that uncorrelated query with the column name from the outer statement.
    This time I use a analytic function.
    untested
    update table1 u
    set u.column1 = (select v1.column1
       from
         (Select t2.column1, t2.columnX, row_number over (partition by t2.column1, t2.columnX order by t2.columnM desc,t2.ColumnN desc) as rn
          from table2
          ) v1
       where v1.columnX = u.columnX
       and v1.rn = 1
    where /* where clause is missing! */

  • Find column name from constraint name

    How to fetch the column name from a constraint name to which the constraint is applied?.
    I only know the name of the constraint and can get the table name from "dba_constraints". How can I know to which column in the table this constraint is applied.
    Thanks

    What about this?
    satyaki>
    satyaki>
    satyaki>desc user_cons_columns;
    Name                                      Null?    Type
    OWNER                                     NOT NULL VARCHAR2(30)
    CONSTRAINT_NAME                           NOT NULL VARCHAR2(30)
    TABLE_NAME                                NOT NULL VARCHAR2(30)
    COLUMN_NAME                                        VARCHAR2(4000)
    POSITION                                           NUMBER
    satyaki>
    satyaki>Regards.
    Satyaki De.

  • How to rename column name of table?

    Hello...
    How to rename column name of table?
    The column have data.
    Thanks.
    Martonio.

    The following should work in 9i release 2 and above.
    SQL> create table mytable(col1 varchar2(2),
      2  col2 date);
    Table created.
    SQL> insert into mytable values('t1',sysdate);
    1 row created.
    SQL> select * from mytable;
    CO COL2
    t1 30-NOV-04
    1 row selected.
    SQL> desc mytable
    Name                                      Null?    Type
    COL1                                               VARCHAR2(2)
    COL2                                               DATE
    SQL> alter table mytable rename column col2 to mydate;
    Table altered.
    SQL> desc mytable
    Name                                      Null?    Type
    COL1                                               VARCHAR2(2)
    MYDATE                                             DATE
    SQL> select * from mytable;
    CO MYDATE
    t1 30-NOV-04
    1 row selected.
    SQL> disconnect
    Disconnected from Oracle9i Enterprise Edition Release 9.2.0.3.0 - 64bit Production
    With the Partitioning option
    JServer Release 9.2.0.3.0 - Productionhttp://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/wnsql.htm#972698

  • View of tables with double column names

    Hello,
    my problem is that in my database schema the name of the primary-key-column in one table has the same name as the corresponding foreign key-column in another table. Now i want to create a view of those two tables and get an error (double column names).
    Is there any chance to avoid this error without rename all my column names (cause this happens many many times)?
    Thanks for any help.
    Christoph

    Hi,
    In SQL you cas prefix the column with its data container. Use this and it'll be OK. This is not an error, it's expected and absolutely normal behaviour.
    SQL> desc dual
    Name                                                                                                  Null?    Type
    DUMMY                                                                                                          VARCHAR2(1)
    SQL> select D1.DUMMY, D2.DUMMY
      2  FROM DUAL D1, DUAL D2
      3  WHERE D1.DUMMY = D2.DUMMY;
    D D
    X XRegards,
    Yoann.

  • Crystal Reports XI: Invalid column name error

    Hello!
    I have a crystal report using a SQL command that is getting the following error (occasionally):
    Failed to retrieve data from the database.
    Details: ADO Error Code: 0x80040e14
    Source: Microsoft OLE DB Provider for SQL Server
    Description: Invalid column name 'IPCSKUGroup'.
    SQL State: 42S22
    Native Error: 207 [Database Vendor Code: 207]
    I say occasionally because if i go to Database>> Log on or Log off server and log off the target server and then rerun the report, it will work.  If i refresh the report with different parameters, i get the error.
    I'm running Crystal Reports XI version 11.0.0.1282 on Windows XP SP2 32-bit.  The data is in a SQL Server 2000 database.
    This is the portion of the query causing the problem:
    (drop/clear temp tables and initiallize a few variables with parameters)
    (...other queries putting together the temp table #WorkingTotals) - This part works fine because the report runs if i remove the following portion.
    select wtt.QtrMax,QuarterName,Year,wtt.IPCSKUGroup as IPCSKUNum,ServicePriceSuggested,PcsBilled,BilledRevenue,PriceIndex,StdRevenue,
    (select sum(TT.BilledRevenue) from
    (select Top 4 wt2.BilledRevenue
    from #WorkingTotals2 wt2
    where wt2.IPCSKUGroup = wtt.IPCSKUGroup and wt2.QtrMax <= wtt.QtrMax order by wt2.QtrMax desc)as TT)
    as M12Revenue
    from #WorkingTotals wtt
    The entire query works fine when I run it in SQL Query Analyzer.  But Crystal has an issue with the way i'm figuring the M12Revenue field.  The M12Revenue is a moving 12 month revenue which is the sum of the revenue for the past 4 quarters for each quarter.
    This is what i've tried thus far:
    Putting the entire query into a stored procedure
    Storing what gets stored in #WorkingTotals into a database table rather than a temp one
    Renaming columns to various different things.
    Each of those still resulted in the error.
    Thanks for the help!!!
    Wes

    Hi Wes,
    What does SQL Profiler show you when the error happens?
    Try using ODBC to see if it also errors, may be an issue in MS's MDAC and the OLE DB driver. MS usually updates MDAC with all Patches but you may want to verify you are using the latest version.
    Thank you
    Don

Maybe you are looking for

  • Preview App "exact shape" tool problem

    Hi, Does anyone notice that "Exact Shape" tool doesn't work the way it should ? It works exactly the same way as "Lasso Selection" so my question is this a bug or am i missing something ? Under Leopard 10.5 everything works fine. Gregor

  • Starting OBPM 10g Execution Engine the first time

    After upgrading to OBPM10g from ALBPM5.7, I'm getting this error in the webconsole.log when I try starting the execution engine. It is complaining about the "looknfeel" not being valid but I'm wondering if that is the problem. Any help is appreciated

  • Arrow key not working properly in JTable in Modal dialog

    in my programme i have a table in a dialog. now while editing table cells wich have a defult editor, left write arrow key does not working as it supposed to. while editing if you press arrow key instead of moving between the characters of the cell it

  • Adobe's Tweens vs TweenLite

    I just found out today that Adobe's Tween Class is very inefficient compared to Jack Doyle's TweenLite of GreenSock.com. Is Adobe revising their tween classes for CS5 or is it not worth to look into?

  • Network address DEFAULT of your computer is not maintained

    Hi Gurus, I'm trying to install DMS (ECC 6.0), when I need to see original document (CV02N) I get the message in subject. Text help indicates the following: In the IMG for document management, you need to make an entry with the network address DEFAUL