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! */
Similar Messages
-
SQL Message 207, Severity 16 - Invalid Column Name
The Config Manager 2012 system seems to be very sick with SQL Message 207, Severity 16 - Invalid Column Name messages in the Management Point logs. The column is populated by NULL values. The error message in the logs suggests I refer to the
Config Man, SQL, or Knowledge Base for further details. I've looked around but I'm not really sure if this is a "repairable" problem. Has anyone seen this before and can point me in the direction to a solution? The server is a standalone
Primary.Hi Niall and Torsten,
Installed in September of last year. Windows Server 2008 R2 Standard, SQL 2008 R2 SP2 (10.50.4000).
The text from the log reads:
Microsoft SQL Server reported SQL message 207, severity 16: [42S22][207][Microsoft][SQL Server Native Client 10.0][SQL Server]Invalid column name 'Distinguished_Name0'.
Please refer to your Configuration Manager documentation, SQL Server documentation, or the Microsoft Knowledge Base for further troubleshooting information.
Followed by:
Discovery Data Manager failed to process the discovery data record (DDR) "D:\Program Files\Microsoft Configuration Manager\inboxes\auth\ddm.box\adsu9110.DDR", because it cannot update the data source.
Possible cause: On a Primary site, it is probably a SQL Server problem.
Solution:
1. Review the immediately preceding status messages from this component about SQL Server errors.
2. Verify that this computer can reach the SQL Server computer.
3. Verify that SQL Server services are running.
4. Verify that the site can access the site database.
5. Verify that the site database, transaction log, and tempdb are not full.
6. Verify that there are at least 50 SQL Server user connections, plus 5 for each Configuration Manager Console.
If the problem persists, check the SQL Server error logs.
Possible cause: On a secondary site, Discovery Data Manager probably cannot write to a file on the site server, so check for low disk space on the site server.
Solution: Make more space available on the site server.
As far as I can tell the services are running, there is no disk space issue, the server can access the database, not sure about the logs or the connections. -
Invalid column name 'origfillfactor'
Hi,
Getting message --- "Failed to load source model. [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'origfillfactor' --- when the OMWB is loading source model.
I am using OMWB 9.2.0.1.7 Build 20031209 with MSQL Server 7.0 plugin. Source DB is SQL Server 7.
In case this is related to Index Fill factor, the current setting on SQL Server (SQL Server properties - Database Settings) is Default(optimal). Should this be changed to set it to a fixed value?
Any hints to solve this....thanksHi,
I found that there is a column by name "OrigFillFactor" in table sysindexes in SQL.
Has anyone come across problems related to field names (esp of system tables) while migrating from SQL 7 to Oracle 8? I am not sure why this error is popping up. But wanted to know how the field name problems are resolved. Maybe the same might work for me too!!
Thanks in anticipation..... -
Okay, I'm by no means a cold fusion expert. But I have been teaching myself over the last year since our website was built off of Cold Fusion. So I need help because I am trying to build a site where people can enter in their e-mail address, and name (first and last) for a sweepstakes that we have on our catalog.
I have create a table called "Sweepstakes" so on my MS SQL 2005 Web Box there is a table under the database called "dbo.sweepstakes". I have replicated basically everything that a original database that was already created to capture user's email address for catalog request and what have you. The original database to capture user's request catalogs from us is called "dbo.InfoRequest" (just a FYI) and this was the database I basically replicated in a way.
So after saying all this, I continue to receive this error message and I can not figure out why. So here is the error message that I am getting.
This is the error when trying to load the database from the "webview" basically. We have an Admin Console to the website and in their, there is a section to list the contents of a specific database. So if you requested a catalog, you put in your name, email address, etc on to the website and when you hit submit on the website it insert it into the database called "dbo.InfoRequest". So when the Spring comes and I want to get a list of people that have request a catalog, I go to our website's admin console and inside there, there is a "List Catalog Request". When you click on it, it loads a file called "ListCatalogRequest.cfm" and it displays the "dbo.InfoRequest" database on the screen in a table format basically. So I am trying to replicate that for this sweepstakes we are having on our website / catalog but without using the "dbo.InfoRequest" database. Since we are doing a drawing, I'd rather it be in it's own database for viewing a drawing. So I have copied the "ListCatalogRequest.cfm" file and renamed it to "ListSweepstakesEntrys.cfm" and changed a couple of things in the file to point to the "dbo.Sweepstakes" that I created this morning and here are the results when you bring up the "ListSweepstakesEntrys.cfm" file.
If you need the results and / or code from either "ListSweepstakesEntrys.cfm" or "IISAdminSecurity.cfm" please let me know.
THANK YOU FOR ALL YOUR HELP IN ADVANCE!
--- ListSweepstakesEntrys.cfm ---
Error Executing Database Query.
[Macromedia][SQLServer JDBC Driver][SQLServer]Invalid column name 'Sweepstakes'.
The error occurred in E:\data\webs\m_k_tweb2007\admin\iiAdminSecurity.CFM: line 298
Called from E:\data\webs\m_k_tweb2007\admin\ListSweepstakesEntrys.cfm: line 2
Called from E:\data\webs\m_k_tweb2007\admin\iiAdminSecurity.CFM: line 298
Called from E:\data\webs\m_k_tweb2007\admin\ListSweepstakesEntrys.cfm: line 2
296 : WHERE
297 : Username = '#Client.Username#'
298 : AND Password = '#Client.Password#'
299 : AND Active = 'Y'
300 : AND UserType = 'A'
SQL SELECT [Sweepstakes] AS TableAccessLevel, MinimumSecurity, IDNumber FROM AdminUsers WHERE Username = 'username' AND Password = 'password' AND Active = 'Y' AND UserType = 'A'
DATASOURCE M_k_tWeb2007
VENDORERRORCODE 207
SQLSTATE 42S22
Resources:
* Check the ColdFusion documentation to verify that you are using the correct syntax.
* Search the Knowledge Base to find a solution to your problem.
Browser Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6 (.NET CLR 3.5.30729)
Remote Address 24.XX.XX.XX
Referrer http://m_k_t.com/admin/admin.cfm
Date/Time 24-Feb-10 07:32 AM
Stack Trace
at cfiiAdminSecurity2eCFM1992009626.runPage(E:\data\webs\m_k_tweb2007\admin\iiAdminSecurity. CFM:298) at cfListSweepstakesEntrys2ecfm1853454474.runPage(E:\data\webs\m_k_tweb2007\admin\ListSweeps takesEntrys.cfm:2) at cfiiAdminSecurity2eCFM1992009626.runPage(E:\data\webs\m_k_tweb2007\admin\iiAdminSecurity. CFM:298) at cfListSweepstakesEntrys2ecfm1853454474.runPage(E:\data\webs\m_k_tweb2007\admin\ListSweeps takesEntrys.cfm:2)
java.sql.SQLException: [Macromedia][SQLServer JDBC Driver][SQLServer]Invalid column name 'Sweepstakes'.
at macromedia.jdbc.base.BaseExceptions.createException(Unknown Source)
at macromedia.jdbc.base.BaseExceptions.getException(Unknown Source)
at macromedia.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown Source)
at macromedia.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown Source)
at macromedia.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source)
at macromedia.jdbc.sqlserver.SQLServerImplStatement.getNextResultType(Unknown Source)
at macromedia.jdbc.base.BaseStatement.commonTransitionToState(Unknown Source)
at macromedia.jdbc.base.BaseStatement.postImplExecute(Unknown Source)
at macromedia.jdbc.base.BaseStatement.commonExecute(Unknown Source)
at macromedia.jdbc.base.BaseStatement.executeInternal(Unknown Source)
at macromedia.jdbc.base.BaseStatement.execute(Unknown Source)
at coldfusion.server.j2ee.sql.JRunStatement.execute(JRunStatement.java:212)
at coldfusion.sql.Executive.executeQuery(Executive.java:753)
at coldfusion.sql.Executive.executeQuery(Executive.java:675)
at coldfusion.sql.Executive.executeQuery(Executive.java:636)
at coldfusion.sql.SqlImpl.execute(SqlImpl.java:236)
at coldfusion.tagext.sql.QueryTag.doEndTag(QueryTag.java:500)
at cfiiAdminSecurity2eCFM1992009626.runPage(E:\data\webs\m_k_tweb2007\admin\iiAdminSecurity. CFM:298)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:152)
at coldfusion.filter.CFVariablesScopeFilter.invoke(CFVariablesScopeFilter.java:63)
at coldfusion.tagext.lang.ModuleTag.doStartTag(ModuleTag.java:255)
at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:1925)
at cfListSweepstakesEntrys2ecfm1853454474.runPage(E:\data\webs\m_k_tweb2007\admin\ListSweeps takesEntrys.cfm:2)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:152)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:349)
at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:225)
at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:51)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:69)
at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8)
at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:115)
at coldfusion.CfmServlet.service(CfmServlet.java:107)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:78)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:257)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541)
at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:204)
at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:318)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:426)
at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:264)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)OK, this is more a SQL question than a CF question, but not to worry.
You say this:
I have create a table called "Sweepstakes"
My emphasis.
But your query is this:
SELECT [Sweepstakes] AS TableAccessLevel, MinimumSecurity, IDNumber FROM AdminUsers WHERE Username = 'username' AND Password = 'password' AND Active = 'Y' AND UserType = 'A'
The question I pose to you is: does a SELECT statement in SQL take the name of a table?
Hint: no.
Best you revise your SQL docs, I think.
Adam
PS: it's "ColdFusion", not "Cold Fusion". Not that it really matters :-) -
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. -
Sybase JDBC driver & Invalid column name error
I submitted a note a year ago concerning JDBC-ODBC bridge and SQL Server db. Same Invalid column name error. The resolution was a bug in the XSU code.
This time the error is with a jconnect5 JDBC driver from Sybase to a Sybase ASA db. ASA is Adaptive Server Anywhere.
<ERROR xsql-timing="140">oracle.xml.sql.OracleXMLSQLException: S0022: Invalid column name 'name'.</ERROR>
However if I use a Sybase JDBC driver from INet Software of Germany, I get the desired result of my query.
Below are sample XSQLConfig.xml definitions.
INet Software Sybase JDBC driver definition:
- <connection name="deasa">
<username>dba</username>
<password>sql</password>
<dburl>jdbc:inetsyb:LEMKAU:2638?database=asademo</dburl>
<driver>com.inet.syb.SybDriver</driver>
<autocommit>true</autocommit>
</connection>
Sybase jconnect5 Sybase JDBC driver definition:
- <connection name="asa">
<username>dba</username>
<password>sql</password>
<dburl>jdbc:sybase:Tds:lemkau:2638?ServiceName=asademo</dburl>
<driver>com.sybase.jdbc.SybDriver</driver>
<autocommit>true</autocommit>
</connection>
I believe the bug has to do with the numeric codes that the drivers use to determine data types are not properly interpreted.
See XML General note title "insert-request, xsu 2.1.0 beta & SQL Server" for reference.
Steve.Thanks for the notification. We will look into this issue...
-
ORA-00904: invalid column name - trying to sum
Hi all
probably somrthing really stupid and easy that I'm missing but here goes
I am trying to gather data from 3 tables, 1st one is stock master file - all records are unique key
2nd table is barcodes, product key can occur 2 / 3 times - one for each barcode that is assigned to a product.
3rd table is warehouse stock, again key can occur a few times as there is a key for each stock record
I need to pull the data from 1st two tables and sum the total of warehouse stock for each record pulled.
I know I will get 2 or 3 records for each stock item as each record will return with a different barcode. what I'm trying to eliminate is returning the same records again with a separate row for each set of warehouse stock records.
If I run
select rmdept||','||rmstyl||','||rmcolr||','||rmsize||','||rmvatc||','||rmshgp||','||
rmdesc||','||rmacod||','||rmcdes||','||rmzdes||','||rmsupp||','||rmsspr||','||
rmlcos||','||rsbarc||','||rmpord||','||rmmrch||','||rmcomq||','||rdcstk
from (select unique a.rmdept,a.rmstyl,a.rmcolr,a.rmsize,a.rmvatc,a.rmshgp,
a.rmdesc,a.rmacod,a.rmcdes,a.rmzdes,a.rmsupp,a.rmsspr,a.rmlcos,c.rsbarc,a.rmpord,a.rmmrch,
a.rmcomq, b.rdcstk
from stkmas a, stkwar b, stkbar c
where a.rmdept = c.rsdept(+) and a.rmstyl = c.rsstyl(+) and a.rmcolr = c.rscolr(+)
and a.rmsize = c.rssize(+) and a.rmdept = b.rddept(+) and a.rmstyl = b.rdstyl(+)
and a.rmcolr = b.rdcolr(+)
and a.rmsize = b.rdsize(+)
group by rmdept, rmstyl, rmcolr, rmsize, rmvatc, rmshgp,
rmdesc, rmacod, rmcdes, rmzdes, rmsupp, rmsspr, rmlcos, rsbarc, rmpord,
rmmrch, rmcomq, rdcstk)
order by rmdept, rmstyl, rmcolr
I get all the data I want, but duplicate rows for every stock record
53117701612,1,705,ECKO LOGO STEE W,,X*BRT.ROSE,WMN 12,G12,25,6.44,,0,LT,539,1
53117701612,1,705,ECKO LOGO STEE W,,X*BRT.ROSE,WMN 12,G12,25,6.44,,0,LT,539,228
the last column is the stock record
I would like to return just one row showing warehouse stock as 229
If I run
select rmdept||rmstyl||rmcolr||rmsize||','||rmvatc||','||rmshgp||','||
rmdesc||','||rmacod||','||rmcdes||','||rmzdes||','||rmsupp||','||rmsspr||','||
rmlcos||','||rsbarc||','||rmpord||','||rmmrch||','||rmcomq||','||sum(rdcstk)
from (select unique a.rmdept,a.rmstyl,a.rmcolr,a.rmsize,a.rmvatc,a.rmshgp,
a.rmdesc,a.rmacod,a.rmcdes,a.rmzdes,a.rmsupp,a.rmsspr,a.rmlcos,c.rsbarc,a.rmpord,a.rmmrch,a.rmcomq, b.rdcstk
from stkmas a, stkwar b, stkbar c
where a.rmdept = c.rsdept(+) and a.rmstyl = c.rsstyl(+) and a.rmcolr = c.rscolr(+)
and a.rmsize = c.rssize(+) and a.rmdept = b.rddept(+) and a.rmstyl = b.rdstyl(+)
and a.rmcolr = b.rdcolr(+)
and a.rmsize = b.rdsize(+))
group by rmdept, rmstyl, rmcolr, rmsize, rmvatc, rmshgp,
rmdesc, rmacod, rmcdes, rmzdes, rmsupp, rmsspr, rmlcos, rsbarc, rmpord,
rmmrch, rmcomq, rdcstk
order by rmdept, rmstyl, rmcolr
sum on rdcstk in first select statement, I still get two records returned
00101401409,1,001,NKE ULTRACELL M,,B/W/R CL44,SIZE 9,N01,5,15.24,0010140194095,0,FW,-1,-1
00101401409,1,001,NKE ULTRACELL M,,B/W/R CL44,SIZE 9,N01,5,15.24,0010140194095,0,FW,-1,0
If I change sum to 2nd select statement and leave the group by statement outside the brackets
select rmdept||rmstyl||rmcolr||rmsize||','||rmvatc||','||rmshgp||','||
rmdesc||','||rmacod||','||rmcdes||','||rmzdes||','||rmsupp||','||rmsspr||','||
rmlcos||','||rsbarc||','||rmpord||','||rmmrch||','||rmcomq||','||rdcstk
from (select unique a.rmdept,a.rmstyl,a.rmcolr,a.rmsize,a.rmvatc,a.rmshgp,
a.rmdesc,a.rmacod,a.rmcdes,a.rmzdes,a.rmsupp,a.rmsspr,a.rmlcos,c.rsbarc,a.rmpord,a.rmmrch,a.rmcomq, sum(b.rdcstk)
from stkmas a, stkwar b, stkbar c
where a.rmdept = c.rsdept(+) and a.rmstyl = c.rsstyl(+) and a.rmcolr = c.rscolr(+)
and a.rmsize = c.rssize(+) and a.rmdept = b.rddept(+) and a.rmstyl = b.rdstyl(+)
and a.rmcolr = b.rdcolr(+)
and a.rmsize = b.rdsize(+))
group by rmdept, rmstyl, rmcolr, rmsize, rmvatc, rmshgp,
rmdesc, rmacod, rmcdes, rmzdes, rmsupp, rmsspr, rmlcos, rsbarc, rmpord,
rmmrch, rmcomq, rdcstk
order by rmdept, rmstyl, rmcolr
I get
rmmrch, rmcomq, rdcstk
ERROR at line 14:
ORA-00904: invalid column name
If I put the group by inside the brackets
select rmdept||rmstyl||rmcolr||rmsize||','||rmvatc||','||rmshgp||','||
rmdesc||','||rmacod||','||rmcdes||','||rmzdes||','||rmsupp||','||rmsspr||','||
rmlcos||','||rsbarc||','||rmpord||','||rmmrch||','||rmcomq||','||rdcstk
from (select unique a.rmdept,a.rmstyl,a.rmcolr,a.rmsize,a.rmvatc,a.rmshgp,
a.rmdesc,a.rmacod,a.rmcdes,a.rmzdes,a.rmsupp,a.rmsspr,a.rmlcos,c.rsbarc,a.rmpord,a.rmmrch,
a.rmcomq, sum(b.rdcstk)
from stkmas a, stkwar b, stkbar c
where a.rmdept = c.rsdept(+) and a.rmstyl = c.rsstyl(+) and a.rmcolr = c.rscolr(+)
and a.rmsize = c.rssize(+) and a.rmdept = b.rddept(+) and a.rmstyl = b.rdstyl(+)
and a.rmcolr = b.rdcolr(+)
and a.rmsize = b.rdsize(+)
group by rmdept, rmstyl, rmcolr, rmsize, rmvatc, rmshgp,
rmdesc, rmacod, rmcdes, rmzdes, rmsupp, rmsspr, rmlcos, rsbarc, rmpord,
rmmrch, rmcomq, rdcstk)
order by rmdept, rmstyl, rmcolr
I get
rmlcos||','||rsbarc||','||rmpord||','||rmmrch||','||rmcomq||','||rdcstk
ERROR at line 3:
ORA-00904: invalid column name
I get the same even if I change the field names in the group by to a.rmdept etc.
rmlcos||','||rsbarc||','||rmpord||','||rmmrch||','||rmcomq||','||rdcstk
ERROR at line 3:
ORA-00904: invalid column name
any help, hints or tips greatly appreciated. this is an 8.1.7 database
Thanks
JanetThanks dnikiforov
still get the
select a.rmdept||a.rmstyl||a.rmcolr||a.rmsize||','||a.rmvatc||','||a.rmshgp||','||rmdesc||','||rmac
ERROR at line 1:
ORA-00904: invalid column name
I think its a problem with trying to select on the unique, anyway I accidentally posted a couple of threads for this and it has now been resolved by
select a.rmdept||a.rmstyl||a.rmcolr||a.rmsize||','||a.rmvatc||','||a.rmshgp||','||
a.rmdesc||',||a.rmacod||','||a.rmcdes||','||a.rmzdes||','||a.rmsupp||','||a.rmsspr||','||a.rmlcos||','||
c.rsbarc||','||a.rmpord||','||a.rmmrch||','||a.rmcomq||','||sum(b.rdcstk)
from stkmas a, stkwar b, stkbar c
where a.rmdept = c.rsdept(+)
and a.rmstyl = c.rsstyl(+)
and a.rmcolr = c.rscolr(+)
and a.rmsize = c.rssize(+)
and a.rmdept = b.rddept(+)
and a.rmstyl = b.rdstyl(+)
and a.rmcolr = b.rdcolr(+)
and a.rmsize = b.rdsize(+)
group by a.rmdept,a.rmstyl,a.rmcolr,a.rmsize,a.rmvatc,a.rmshgp,
a.rmdesc,a.rmacod,a.rmcdes,a.rmzdes,a.rmsupp,a.rmsspr, a.rmlcos,
c.rsbarc,a.rmpord,a.rmmrch,a.rmcomq
as I dont need to use the unique because the sum does it for me
Thanks again for speedy help -
The error: "Oracle Error 904 / Invalid Column name"
When I try to take the Oracle Backup with the Exp command. I got the following error.
The error: "Oracle Error 904 / Invalid Column name" .
Any solution or suggestion?????????Asif, to add another question to the list of things to check. Is the version of the exp utility you are using to perform the export operation the same version as the database? If not, that would explain the error.
If you are trying to export using a newer version of the export utility that generally will not work. You should switch to using the db version.
If you are exporting using an older version because the target is an older version then usually you need to run the catexp# where # is the version number script for the target version that Oracle provides in the $ORACLE_HOME/rdbms/admin directory.
HTH -- Mark D Powell -- -
Invalid column name in WLS 6.1 sp4
We have been using WLS 6.1 sp2 with toplink and never had any problems. Recently
we migrated to sp4 and get a invalid column name exception while updating records.
For select queries there is no error. The SQL generated by toplink is -
UPDATE PR_SUPP SET CNTC_PRSN_NAME = ''
, REMK = 'Remark 123', LAST_CHNG_DTTM = {ts '2002-11-29 10:59:56.0'} WHERE ((S
UPP_CODE = 'A0001') AND (LAST_CHNG_DTTM = {ts '2002-11-29 10:46:01.0'}))
It looks like some problem with the JDBC driver. The databse is Oracle 8.17. How
to fix it
The exception stack trace is -
2002-11-27 11:56:25,763 ERROR com.pws.ubiquity.pr.business.TransactionTypeFacade
- Error while commiting transaction (creating TransactionType):LOCAL EXCEPTION
STACK:
EXCEPTION [TOPLINK-4002] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exceptions.DatabaseException
EXCEPTION DESCRIPTION: java.sql.SQLException: ORA-00904: invalid column name
INTERNAL EXCEPTION: java.sql.SQLException: ORA-00904: invalid column name
ERROR CODE: 904
at oracle.toplink.exceptions.DatabaseException.sqlException(Unknown Source)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(Unknown
Source)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeNoSelect(Unknown
Source)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(Unknown
Source)
at oracle.toplink.publicinterface.UnitOfWork.executeCall(Unknown Source)
at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(Unknown
Source)
at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(Unknown
Source)
at oracle.toplink.internal.queryframework.CallQueryMechanism.insertObject(Unknown
Source)
at oracle.toplink.internal.queryframework.StatementQueryMechanism.insertObject(Unknown
Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(Unknown
Source)
at oracle.toplink.queryframework.InsertObjectQuery.executeCommit(Unknown Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedWrite(Unknown
Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedInsert(Unknown
Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(Unknown
Source)
at oracle.toplink.queryframework.WriteObjectQuery.executeCommit(Unknown Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.executeWrite(Unknown
Source)
at oracle.toplink.queryframework.WriteObjectQuery.execute(Unknown Source)
at oracle.toplink.queryframework.DatabaseQuery.execute(Unknown Source)
at oracle.toplink.publicinterface.Session.internalExecuteQuery(Unknown Source)
at oracle.toplink.publicinterface.UnitOfWork.internalExecuteQuery(Unknown Source)
at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
at oracle.toplink.internal.sessions.CommitManager.commitAllObjects(Unknown Source)
at oracle.toplink.publicinterface.Session.writeAllObjects(Unknown Source)
at oracle.toplink.publicinterface.UnitOfWork.commitToDatabase(Unknown Source)
at oracle.toplink.publicinterface.UnitOfWork.issueSQLbeforeCompletion(Unknown
Source)
at oracle.toplink.jts.AbstractSynchronizationListener.beforeCompletion(Unknown
Source)
at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:551)
at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:88)
at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:982)
at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:1506)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:215)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:189)
at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:247)
at com.pws.ubiquity.pr.business.TransactionTypeFacade.addTransactionType(TransactionTypeFacade.java:584)
at com.pws.ubiquity.pr.business.TransactionTypeFacade_ocr0a6_EOImpl.addTransactionType(TransactionTypeFacade_ocr0a6_EOImpl.java:271)
at com.pws.ubiquity.pr.web.action.AddTransactionTypeAction.doExecute(AddTransactionTypeAction.java:120)
at com.pws.ubiquity.common.web.action.SecureAction.perform(SecureAction.java:240)
at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1786)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:262)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:198)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2637)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2359)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
INTERNAL EXCEPTION STACK:
java.sql.SQLException: ORA-00904: invalid column name
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
at weblogic.jdbc.jts.Statement.executeUpdate(Statement.java:503)
at weblogic.jdbc.rmi.internal.PreparedStatementImpl.executeUpdate(PreparedStatementImpl.java:66)
at weblogic.jdbc.rmi.SerialPreparedStatement.executeUpdate(SerialPreparedStatement.java:57)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(Unknown
Source)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeNoSelect(Unknown
Source)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(Unknown
Source)
at oracle.toplink.publicinterface.UnitOfWork.executeCall(Unknown Source)
at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(Unknown
Source)
at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(Unknown
Source)
at oracle.toplink.internal.queryframework.CallQueryMechanism.insertObject(Unknown
Source)
at oracle.toplink.internal.queryframework.StatementQueryMechanism.insertObject(Unknown
Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(Unknown
Source)
at oracle.toplink.queryframework.InsertObjectQuery.executeCommit(Unknown Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedWrite(Unknown
Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedInsert(Unknown
Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(Unknown
Source)
at oracle.toplink.queryframework.WriteObjectQuery.executeCommit(Unknown Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.executeWrite(Unknown
Source)
at oracle.toplink.queryframework.WriteObjectQuery.execute(Unknown Source)
at oracle.toplink.queryframework.DatabaseQuery.execute(Unknown Source)
at oracle.toplink.publicinterface.Session.internalExecuteQuery(Unknown Source)
at oracle.toplink.publicinterface.UnitOfWork.internalExecuteQuery(Unknown Source)
at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
at oracle.toplink.internal.sessions.CommitManager.commitAllObjects(Unknown Source)
at oracle.toplink.publicinterface.Session.writeAllObjects(Unknown Source)
at oracle.toplink.publicinterface.UnitOfWork.commitToDatabase(Unknown Source)
at oracle.toplink.publicinterface.UnitOfWork.issueSQLbeforeCompletion(Unknown
Source)
at oracle.toplink.jts.AbstractSynchronizationListener.beforeCompletion(Unknown
Source)
at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:551)
at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:88)
at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:982)
at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:1506)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:215)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:189)
at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:247)
at com.pws.ubiquity.pr.business.TransactionTypeFacade.addTransactionType(TransactionTypeFacade.java:584)
at com.pws.ubiquity.pr.business.TransactionTypeFacade_ocr0a6_EOImpl.addTransactionType(TransactionTypeFacade_ocr0a6_EOImpl.java:271)
at com.pws.ubiquity.pr.web.action.AddTransactionTypeAction.doExecute(AddTransactionTypeAction.java:120)
at com.pws.ubiquity.common.web.action.SecureAction.perform(SecureAction.java:240)
at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1786)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:262)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:198)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2637)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2359)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
--------------- nested within: ------------------
weblogic.transaction.RollbackException: Unexpected exception in beforeCompletion:
sync=oracle.toplink.jts.wls.WebLogicSynchronizationListener@373d4a
EXCEPTION DESCRIPTION: java.sql.SQLException: ORA-00904: invalid column name
INTERNAL EXCEPTION: java.sql.SQLException: ORA-00904: invalid column name
ERROR CODE: 904 - with nested exception:
[EXCEPTION [TOPLINK-4002] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exceptions.DatabaseException
EXCEPTION DESCRIPTION: java.sql.SQLException: ORA-00904: invalid column name
INTERNAL EXCEPTION: java.sql.SQLException: ORA-00904: invalid column name
ERROR CODE: 904]
at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1490)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:265)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:189)
at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:247)
at com.pws.ubiquity.pr.business.TransactionTypeFacade.addTransactionType(TransactionTypeFacade.java:584)
at com.pws.ubiquity.pr.business.TransactionTypeFacade_ocr0a6_EOImpl.addTransactionType(TransactionTypeFacade_ocr0a6_EOImpl.java:271)
at com.pws.ubiquity.pr.web.action.AddTransactionTypeAction.doExecute(AddTransactionTypeAction.java:120)
at com.pws.ubiquity.common.web.action.SecureAction.perform(SecureAction.java:240)
at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1786)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:262)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:198)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2637)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2359)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
2002-11-27 11:56:25,793 DEBUG com.pws.framework.common.MessageSourceFactory -
Get MessageSource for error message.:
2002-11-27 11:56:25,793 DEBUG com.pws.framework.common.MessageSourceFactory -
Get MessageSource for error message.:
com.pws.framework.exception.GeneralException: There was an unexpected error. Please
contact your system administrator.
at com.pws.framework.exception.GeneralException.create(GeneralException.java:111)
at com.pws.ubiquity.pr.business.TransactionTypeFacade.addTransactionType(TransactionTypeFacade.java:588)
at com.pws.ubiquity.pr.business.TransactionTypeFacade_ocr0a6_EOImpl.addTransactionType(TransactionTypeFacade_ocr0a6_EOImpl.java:271)
at com.pws.ubiquity.pr.web.action.AddTransactionTypeAction.doExecute(AddTransactionTypeAction.java:120)
at com.pws.ubiquity.common.web.action.SecureAction.perform(SecureAction.java:240)
at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1786)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:262)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:198)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2637)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2359)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)We have changed default thin driver to 920 from 817 in 610sp4. If you are using 817/901 dbserver, please put 817/901 classes12.zip in your
classpath before weblogic.jar and you will be ok.
Mitesh
vivek wrote:
We have been using WLS 6.1 sp2 with toplink and never had any problems. Recently
we migrated to sp4 and get a invalid column name exception while updating records.
For select queries there is no error. The SQL generated by toplink is -
UPDATE PR_SUPP SET CNTC_PRSN_NAME = ''
, REMK = 'Remark 123', LAST_CHNG_DTTM = {ts '2002-11-29 10:59:56.0'} WHERE ((S
UPP_CODE = 'A0001') AND (LAST_CHNG_DTTM = {ts '2002-11-29 10:46:01.0'}))
It looks like some problem with the JDBC driver. The databse is Oracle 8.17. How
to fix it
The exception stack trace is -
2002-11-27 11:56:25,763 ERROR com.pws.ubiquity.pr.business.TransactionTypeFacade
- Error while commiting transaction (creating TransactionType):LOCAL EXCEPTION
STACK:
EXCEPTION [TOPLINK-4002] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exceptions.DatabaseException
EXCEPTION DESCRIPTION: java.sql.SQLException: ORA-00904: invalid column name
INTERNAL EXCEPTION: java.sql.SQLException: ORA-00904: invalid column name
ERROR CODE: 904
at oracle.toplink.exceptions.DatabaseException.sqlException(Unknown Source)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(Unknown
Source)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeNoSelect(Unknown
Source)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(Unknown
Source)
at oracle.toplink.publicinterface.UnitOfWork.executeCall(Unknown Source)
at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(Unknown
Source)
at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(Unknown
Source)
at oracle.toplink.internal.queryframework.CallQueryMechanism.insertObject(Unknown
Source)
at oracle.toplink.internal.queryframework.StatementQueryMechanism.insertObject(Unknown
Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(Unknown
Source)
at oracle.toplink.queryframework.InsertObjectQuery.executeCommit(Unknown Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedWrite(Unknown
Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedInsert(Unknown
Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(Unknown
Source)
at oracle.toplink.queryframework.WriteObjectQuery.executeCommit(Unknown Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.executeWrite(Unknown
Source)
at oracle.toplink.queryframework.WriteObjectQuery.execute(Unknown Source)
at oracle.toplink.queryframework.DatabaseQuery.execute(Unknown Source)
at oracle.toplink.publicinterface.Session.internalExecuteQuery(Unknown Source)
at oracle.toplink.publicinterface.UnitOfWork.internalExecuteQuery(Unknown Source)
at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
at oracle.toplink.internal.sessions.CommitManager.commitAllObjects(Unknown Source)
at oracle.toplink.publicinterface.Session.writeAllObjects(Unknown Source)
at oracle.toplink.publicinterface.UnitOfWork.commitToDatabase(Unknown Source)
at oracle.toplink.publicinterface.UnitOfWork.issueSQLbeforeCompletion(Unknown
Source)
at oracle.toplink.jts.AbstractSynchronizationListener.beforeCompletion(Unknown
Source)
at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:551)
at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:88)
at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:982)
at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:1506)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:215)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:189)
at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:247)
at com.pws.ubiquity.pr.business.TransactionTypeFacade.addTransactionType(TransactionTypeFacade.java:584)
at com.pws.ubiquity.pr.business.TransactionTypeFacade_ocr0a6_EOImpl.addTransactionType(TransactionTypeFacade_ocr0a6_EOImpl.java:271)
at com.pws.ubiquity.pr.web.action.AddTransactionTypeAction.doExecute(AddTransactionTypeAction.java:120)
at com.pws.ubiquity.common.web.action.SecureAction.perform(SecureAction.java:240)
at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1786)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:262)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:198)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2637)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2359)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
INTERNAL EXCEPTION STACK:
java.sql.SQLException: ORA-00904: invalid column name
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
at weblogic.jdbc.jts.Statement.executeUpdate(Statement.java:503)
at weblogic.jdbc.rmi.internal.PreparedStatementImpl.executeUpdate(PreparedStatementImpl.java:66)
at weblogic.jdbc.rmi.SerialPreparedStatement.executeUpdate(SerialPreparedStatement.java:57)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(Unknown
Source)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeNoSelect(Unknown
Source)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(Unknown
Source)
at oracle.toplink.publicinterface.UnitOfWork.executeCall(Unknown Source)
at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(Unknown
Source)
at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(Unknown
Source)
at oracle.toplink.internal.queryframework.CallQueryMechanism.insertObject(Unknown
Source)
at oracle.toplink.internal.queryframework.StatementQueryMechanism.insertObject(Unknown
Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(Unknown
Source)
at oracle.toplink.queryframework.InsertObjectQuery.executeCommit(Unknown Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedWrite(Unknown
Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedInsert(Unknown
Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(Unknown
Source)
at oracle.toplink.queryframework.WriteObjectQuery.executeCommit(Unknown Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.executeWrite(Unknown
Source)
at oracle.toplink.queryframework.WriteObjectQuery.execute(Unknown Source)
at oracle.toplink.queryframework.DatabaseQuery.execute(Unknown Source)
at oracle.toplink.publicinterface.Session.internalExecuteQuery(Unknown Source)
at oracle.toplink.publicinterface.UnitOfWork.internalExecuteQuery(Unknown Source)
at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
at oracle.toplink.internal.sessions.CommitManager.commitAllObjects(Unknown Source)
at oracle.toplink.publicinterface.Session.writeAllObjects(Unknown Source)
at oracle.toplink.publicinterface.UnitOfWork.commitToDatabase(Unknown Source)
at oracle.toplink.publicinterface.UnitOfWork.issueSQLbeforeCompletion(Unknown
Source)
at oracle.toplink.jts.AbstractSynchronizationListener.beforeCompletion(Unknown
Source)
at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:551)
at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:88)
at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:982)
at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:1506)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:215)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:189)
at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:247)
at com.pws.ubiquity.pr.business.TransactionTypeFacade.addTransactionType(TransactionTypeFacade.java:584)
at com.pws.ubiquity.pr.business.TransactionTypeFacade_ocr0a6_EOImpl.addTransactionType(TransactionTypeFacade_ocr0a6_EOImpl.java:271)
at com.pws.ubiquity.pr.web.action.AddTransactionTypeAction.doExecute(AddTransactionTypeAction.java:120)
at com.pws.ubiquity.common.web.action.SecureAction.perform(SecureAction.java:240)
at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1786)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:262)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:198)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2637)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2359)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
--------------- nested within: ------------------
weblogic.transaction.RollbackException: Unexpected exception in beforeCompletion:
sync=oracle.toplink.jts.wls.WebLogicSynchronizationListener@373d4a
EXCEPTION DESCRIPTION: java.sql.SQLException: ORA-00904: invalid column name
INTERNAL EXCEPTION: java.sql.SQLException: ORA-00904: invalid column name
ERROR CODE: 904 - with nested exception:
[EXCEPTION [TOPLINK-4002] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exceptions.DatabaseException
EXCEPTION DESCRIPTION: java.sql.SQLException: ORA-00904: invalid column name
INTERNAL EXCEPTION: java.sql.SQLException: ORA-00904: invalid column name
ERROR CODE: 904]
at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1490)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:265)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:189)
at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:247)
at com.pws.ubiquity.pr.business.TransactionTypeFacade.addTransactionType(TransactionTypeFacade.java:584)
at com.pws.ubiquity.pr.business.TransactionTypeFacade_ocr0a6_EOImpl.addTransactionType(TransactionTypeFacade_ocr0a6_EOImpl.java:271)
at com.pws.ubiquity.pr.web.action.AddTransactionTypeAction.doExecute(AddTransactionTypeAction.java:120)
at com.pws.ubiquity.common.web.action.SecureAction.perform(SecureAction.java:240)
at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1786)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:262)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:198)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2637)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2359)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
2002-11-27 11:56:25,793 DEBUG com.pws.framework.common.MessageSourceFactory -
Get MessageSource for error message.:
2002-11-27 11:56:25,793 DEBUG com.pws.framework.common.MessageSourceFactory -
Get MessageSource for error message.:
com.pws.framework.exception.GeneralException: There was an unexpected error. Please
contact your system administrator.
at com.pws.framework.exception.GeneralException.create(GeneralException.java:111)
at com.pws.ubiquity.pr.business.TransactionTypeFacade.addTransactionType(TransactionTypeFacade.java:588)
at com.pws.ubiquity.pr.business.TransactionTypeFacade_ocr0a6_EOImpl.addTransactionType(TransactionTypeFacade_ocr0a6_EOImpl.java:271)
at com.pws.ubiquity.pr.web.action.AddTransactionTypeAction.doExecute(AddTransactionTypeAction.java:120)
at com.pws.ubiquity.common.web.action.SecureAction.perform(SecureAction.java:240)
at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1786)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:262)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:198)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2637)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2359)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120) -
Invalid column name in query string - using Format function
In my post just before this one the problem was solved for writing a query string using a date range. The rest of the query string includes the same date field (Call_Date) but formatted as 'MMM-YY'. I get an invalid column name error when I add this field to the query string. Here is the rest of the query string:
strSql = "SELECT Format(CALL_DATE,'mmm-yy'), " _
& "HOME_REGION FROM CCC2.CASE_EPRP " _
& "WHERE (HOME_REGION = 'NCR') AND " _
"(CALL_DATE >= to_date( '1/1/2002', 'MM/DD/YYYY' )" _
& "AND CALL_DATE <= to_date( '2/28/2003', 'MM/DD/YYYY' ))"
In the Access Query tool I can include this field
Format(CALL_DATE,'mmm-yy')
and the query runs fine (I just need to make it dynamic using ADO). But in my ADO query string above, I get the invalid column name error. Is there a way I can include
Format(CALL_DATE,'mmm-yy')
in my ADO query string? I appologize for not being more familiar with Oracle Sql. Any help greatly appreciated.
Thanks again,
RichThank you very much for your reply. I think I'm getting closer to the solution. Just I got an error message
"date format not recognized"
when I add "to_char( call_date, 'mmm-yy' )" to the query string. I tried using all uppercase, but that did not make a difference. Do I need to use to_date inside the to_char maybe?
to_char(to_date(call_date, 'mmm/yy'), 'mmm-yy')
Thanks again for your help.
Rich -
Invalid column name error in JDBC adapter
Hi all,
My scenario is Proxy->XI->JDBC.
I get the following error in receiver JDBC adapter.
Unable to execute statement for table or stored procedure. 'Account_Master' (Structure 'STATEMENT') due to com.microsoft.sqlserver.jdbc.SQLServerException: Invalid column name 'A7'.
There is no column by name A7 in the table nor there is a field by that name in the data type.
Can anyone provide any helpHi Swatantra,
compare your message-type with the database table!
There must be difference!
Regards Mario -
After 8.8 Upgrade Invalid Column Name error on UDF in Sales Order
I have upgraded a dtaabase from 2005A to 8.8 SP00 PL15.
I encountered a UDF/UDT warning (Note 1360832) in the Pre-Upgrade CHeck but proceeded in any case.
After the upgrade as soon as I enter the BP in a Sales Order, I get the following error.
[Microsoft] [SQL Server Native Client 10.0] [SQL Server] [Invalid Column Name U_CampPB1.2)
[Microsoft] [SQL Server Native Client 10.0] [SQL Server] Statement 'Withholding Tax' (OWHT) could not be prepared.
This UDF was one of many reported in the Upgrade Wizard Log File as having an incorrect Type.
" Type is different; Should be A, Is M".
There are hundreds of instances of this message in the log.
I don't know whether the error is related to the Type is different warning.
I don't get the error when I add an AR Invoice.
In addition I cannot find any documentation on the different UDF Type codes.Hi,
should you have any errors before or after upgrade, log a message to a support. That's the best solution.
JimM -
SSMS 2012: Using CTE in a query - Invalid column name 'EmployeeID' !!??
Hi all,
From Page 88 of the Book "SQL Programming & Database Design Using Microsoft SQL Server 2012" written by Kalman Toth, I copied the following code of Using CTE in a query:
-- CTETest2.sql /// saved in C:\My Documents\SQL Server Management Studio\
----Page 88 of Book by Toth === Using CTE in a query ----- 13 March 2015
--Using CTE in a query
;WITH CTE (SalesPersonID, NumberOfOrders, MostRecentOrderDate)
AS (SELECT SalesPersonID, COUNT(*), CONVERT(date, MAX(OrderDate))
FROM Sales.SalesOrderHeader GROUP BY SalesPersonID )
--Start of outer (main) query
SELECT E.EmployeeID,
OE.NumberOfOrders AS EmpOrders,
OE.MostRecentOrderDate AS EmpLastOrder,
E.ManagerID,
OM.NumberOfOrders AS MgrOrders,
OM.MostRecentOrderDate AS MgrLastOrder
FROM HumanResources.Employee AS E
INNER JOIN CTE AS OE ON E.EmployeeID = OE.SalesPersonID
LEFT OUTER JOIN CTE AS OM ON E.ManagerID = OM.SalesPersonID
In my SQL Server 2012 Management Studio, I executed this set of code and I got the following fatal error:
Msg 207, Level 16, State 1, Line 16
Invalid column name 'EmployeeID'.
I have no clues why I got this error message in this .sql trial of my second practice in doing CTE. Please kindly help and let me know where I made mistake and how to resolve this problem.
Thanks in advance,
Scott ChangHi scott_morris-ga, Thanks for your nice response.
I changed EmployeeID to BusinessEntityID as you pointed out and executed the revised code:
-- CTETest2.sql /// saved in C:\My Documents\SQL Server Management Studio\
----Page 88 of Book by Toth === Using CTE in a query ----- 13 March 2015
--Using CTE in a query
;WITH CTE (SalesPersonID, NumberOfOrders, MostRecentOrderDate)
AS (SELECT SalesPersonID, COUNT(*), CONVERT(date, MAX(OrderDate))
FROM Sales.SalesOrderHeader GROUP BY SalesPersonID )
--Start of outer (main) query
SELECT E.BusinessEntityID,
OE.NumberOfOrders AS EmpOrders,
OE.MostRecentOrderDate AS EmpLastOrder,
E.ManagerID,
OM.NumberOfOrders AS MgrOrders,
OM.MostRecentOrderDate AS MgrLastOrder
FROM HumanResources.Employee AS E
INNER JOIN CTE AS OE ON E.BusinessEntityID = OE.SalesPersonID
LEFT OUTER JOIN CTE AS OM ON E.ManagerID = OM.SalesPersonID
I got 2 new error messages:
Msg 207, Level 16, State 1, Line 17
Invalid column name 'ManagerID'.
Msg 207, Level 16, State 1, Line 12
Invalid column name 'ManagerID'.
I have no ideas what should be used to replace 'ManagerID' in my revised code. Could you please help again and give me the right thing to replace the 'ManagerID'? By the way, where in the AdventureWorks do you find the right things? Please enlighten
me in this matter.
Many Thanks again, Scott Chang -
"Invalid column name 'DiscountPartNo'." during Items Synch
Hi everyone, I'm having the following error message on the items synchronization part.
Invalid column name 'DiscountPartNo'.
Invalid column name 'DiscountPartNo'.
at netpoint.api.data.DataFunctions.ExecuteReader(CommandType commandType, String SQL, IDataParameter[] parameters, String connectionstring)
at netpoint.api.catalog.NPPart.Fetch(String partNo, String catalogCode)
at netpoint.api.catalog.NPPart..ctor(String partNo, NPConnection conn)
at NetPoint.SynchSBO.SBOObjects.SBOItem.SBOToNetPoint(SBOQueueObject qData)
at NetPoint.SynchSBO.SynchObjectBase.Synch()
I'm working with WebTools 2007 PL06 and SAP 2007 PL15.
Running the synchronization process for the first time on this DB and it seems that I can't sort this problem alone.
It would be of great assistance if someone could help me on this one. Thanks in advance.Well I've double checked and the WebTools version is 626 (files versions 626 also) but It was a previous upgrade from 624 so what I did was Backup and uninstall everything, manually delete folders, DB, site, etc. then Install all over again with version 626 from scratch and it worked perfect!
So problem solved. Thanks Shane! -
Invalid column name in IMGSimilar
Hi all,
I have a question for the function IMGSimilar.
I have a table musterbildsig, in which the generated signatures of 100 pictures are stored in the column msbild_sig. Each Signature in this table is to compare with all signatures in the column bild_signature of the table bildtable_intern_signature.
I use the following java code.
OracleResultSet rs_mbsig = (OracleResultSet) stmt.executeQuery("SELECT * FROM musterbildsig");
while (rs_mbsig.next()){
OrdImageSignature mbsig = (OrdImageSignature) rs_mbsig.getCustomDatum(2, OrdImageSignature.getFactory());
String str = "SELECT bsig.bild_id, ORDSYS.IMGScore(1) AS Score FROM bildtable_intern_signature bsig WHERE ORDSYS.IMGSimilar(bsig.bild_signature, mbsig, 'color=\"0,7\" texture=\"0,5\" location=\"0,1\"', (float)th, 1) = 1 ORDER BY Score asc";
OracleResultSet rs = (OracleResultSet) stmt.executeQuery(str);
But i get the error message: invalid column name.
I think, mbsig is wrong. But i don't know, how can i correct that?
Please help!
Thank you very much and greeting from germany!
rabbitHi,
I think you aren't able to use "mbsig" directly in your query string. Instead you should substitute it with "?" as follows.
String str = "SELECT bsig.bild_id, ORDSYS.IMGScore(1) AS Score FROM bildtable_intern_signature bsig WHERE ORDSYS.IMGSimilar(bsig.bild_signature, ?, 'color=\"0,7\" texture=\"0,5\" location=\"0,1\"', (float)th, 1) = 1 ORDER BY Score asc";
After you have to declare, what "?" is by:
OraclePreparedStatement stmt = (OraclePreparedStatement)conn.prepareStatement(str);
stmt.setCustomDatum(1, mbsig);
Now you can retrieve data with:
OracleResultSet rs = (OracleResultSet) stmt.executeQuery();
I hope it helps.
greetings from germany :)
Christian
Maybe you are looking for
-
I have to assemble a series of security cam video and no matter what format I try for export I get the error message Pproheadless has encountered an error [..\..\Src\WinFile.cpp-759] the original video is .avi 320x240 framerate 30 square pixels any i
-
Photosmart 6515 prints too small
I have a Mac book Pro and lately when I try to print a document from the internet is prints bits and pieces of the page over several pages and very small print. For example, I tried to print a boarding pass today and it printed parts of it over 4 pa
-
How to not show detail but keep aggregated calculation results.
Hi, I have some calculations performed through variables. For some reason, to keep the correct calculation displayed i can only do it by displaying the detail data I'm doing the calculations with. Is there anyway around this? I've attached an attachm
-
Why can't I get my Thunderoblt FFC to work?
I select the camera app, Menu, and Switch Camera and get the following error: "The application Camera (process.com.android,camer) has stopped unexpectedly. Please try again." and has a "Force Close" button to exit out of the message.
-
I have a TP-Link TL-WN727N wireless dongle, which uses the rt2800usb driver. Unfortunately, I am having issues with it and it basically doesn't work at all. It will work for a minute before failing and after that, it won't connect at all. I have no i