Matching table
hi gurus,
i need to generate a report wich displays profitcenters, given the iput are below fields.
Offer Status CNJ_STAT-STTXT_EXT
Company Code T001-BUKRS
Business Entity VIBDBU-SWENR
Building VIBDBU-SGENR
City AD_CITY1
State REGIO
i could not find a table which could get me a profit center for these given inputs.
thank you
Check with the table.
<b>S401</b> (RE standard analysis partner)
<b>S406</b> (Rental units)
Regards,
Maha
Similar Messages
-
Hii ..
need help on this ..
This what I am doing ..
I am using a DATAEXPORT function to export level0 data from my essbase 11.1.2.2 to Microsoft SQL 2008 tables.
So what I did first I exported the level0 data to a flat file using DATAEXPORT and the created the SQL columns by the same in that order only in my SQL table.
When I run it fails with this error:
ODBC Layer Error: [21S01] ==> [[DataDirect][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]Column name or number of supplied values does not match table definition.]
[Tue Jul 23 18:26:07 2013]Local/dataexp/dataexp/admin@Native Directory/1209813312/Info(1021014)
ODBC Layer Error: Native Error code [213]
[Tue Jul 23 18:26:07 2013]Local/dataexp/dataexp/admin@Native Directory/1209813312/Error(1012085)
Unable to export data to SQL table [dataexp]. Check the Essbase server log and the system console to determine the cause of the problem.
[Tue Jul 23 18:26:07 2013]Local/dataexp/dataexp/admin@Native Directory/1209813312/Info(1021002)
SQL Connection is Freed
[Tue Jul 23 18:26:07 2013]Local/dataexp/dataexp/admin@Native Directory/1209813312/Warning(1080014)
Transaction [ 0x1c50001( 0x51ee7d66.0x80342 ) ] aborted due to status [1012085].
[Tue Jul 23 18:26:07 2013]Local/dataexp/dataexp/admin@Native Directory/1209813312/Info(1012579)
Total Calc Elapsed Time for [test.csc] : [1.44] seconds
=============================================================
I did a simple test on my Sample.basic application then ..
loaded the calc data to it and then used the below script to export to a flat file
//ESS_LOCALE English_UnitedStates.Latin1@Binary
SET DATAEXPORTOPTIONS
DataExportLevel "Level0";
DataExportOverwriteFile ON;
DataExportColFormat OFF;
DataExportDimHeader OFF;
FIX(
"Jan",
"Sales",
"Actual"
/*DATAEXPORT "File" "," "/home/hypadmin/samtest.txt";*/
DATAEXPORT "DSN" "Abhitest" "sample" "sa" "welcome1";
ENDFIX
out put as below:
"Sales"
"100-30","California"
"Jan","Actual",145
Now In sql I created only 3 columns with name Jan/Sales/Actual and when I run this script again with comments removed .. I get the same error as what I have got in my first test case with other application ..
but when I create the columns with same name as what its in export
Sales/100-30/Califirnia/Jan/Actual
It created the new rows successfully ..
So with this I think the error which I am getting with my other application might be because of the same column issue .. but then I have created all the columns by looking at the export file only as I did in sample ..
Any idea would be helpful ..
Thanks
Abhishek
IFirst make sure you add
DataExportRelationalFile ON;
to your set commands it is missing
I alwats like to also add
DataExportColHeader dimensionName;
so I am sure what dimension is getting put into the columns.
Then count the number of dimensions in your outline (exclude attribute dimensions). You need at least that many columns in your table -1 + the number of members you will be returning as columns in the export
Taking your example Sample basic has 5 dimensions
Measures
Years
Scenario
Product
Market
Since you did not specify a dataexportcolheader it took the dense dimension Scenario as the columns. Your fix statement is limiting that to one member. Doing the math
5 -1 + 1 = 5 columns in your table which is what you found works. Suppose you fixed on bothe Actual and budget in scenario then you would need 6 columns 5 -1 +2 -
Column name or number of supplied values does not match table definition
Buongiorno a tutti,
sto cercando di inserire dei record in un database SQL, usando l'oggetto DB tools Insert data. Purtroppo però mi viene segnalato il seguente errore:
"Exception occured in Microsoft OLE DB Provider for SQL Server: Column name or number of supplied values does not match table definition. in NI_Database_API.lvlib:Rec Create - Command.vi->NI_Database_API.lvlib:Cmd Execute.vi->NI_Database_API.lvlibB Tools Insert Data.vi"
Il recod viene generato da Labivew usando l'oggetto concatanate string e i campi sono separati da tab. se esporto su Excel sembra tutto corretto e non ho errori. Le colonne del mio database corrispondono a quelle del record e sono tutte varchar. Vi allego la porzione di codice che genera il record.
Suggerimenti?
Grazie,
Davide
Allegati:
db.png 5 KBPer qualche strano motivo l'editor ha convertuito la sequenza di caratteri ":" e "D" in uno smile
-
Error : No matching Table
Hi All,
I am migrating form Analytics 7.7 to OBIEE, after migrating catalog and RPD, i am facing error in some of the reports.
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 46043] Internal error: No matching table for expr NRT.SH_TYPE, File .\Src\SQOSPSimplifyJoin.cpp, line 118. (HY000)
i am using the SH_TYPE as filter in the request.
Thanks
RupeshHi Rupesh,
By strange coincidence I just got this error myself, only I have an Essbase data source. A quick Google search return a few results suggesting this is a C++ code error in the Admin tool. As I thought this is a corruption of some sort, to resolve it I had to effectively re-create all the joins in my schema and it all works OK now.
It appears that this might be related to importing certain parts of the repository by copying and pasting from another rpd, not sure if you have been doing that. I try not to but had to do it recently and I guess this eror is the consequence.
regards
Ed -
Hi
I am designing a variant function where I have to pass an input characteristic , say X along with a bunch of other characteristics to a function module. The function module will modify X and this has to be passed back to VC through MATCH.
Now this doesnt work, as I found out that MATCH ignores value modifications to chars in QUERY. Any ideas how I can solve this problem?
ThanksAlright...
Characteristic X can take on values - A,B,C,D. If the value is A, then I call a function module to read Z-tables. Based on my Z-table comparison, the characteristic value is modified as either A or B. If neither, then the value is not passed back in the MATCH table and it remains the same as before.
If I pass X as an input parameter, then any modification to it in the FM is not passed in the MATCH structure. How can I fix this? -
Insert Error: Column name or number of supplied values does not match table definition.
I'm getting this error when I try to run my stored procedure, I have checked that the inserts matches the select, which seemed to be
the issue for most of the time this question is asked. As far as I can tell they match so something else must be wrong.
Code:-
CREATE proc [dbo].[prc_ITEM_master_Customer]
as
begin
set nocount on
/****** Object: Table [dbo].[tempdb..tmpWebCustomers] Script Date: 03/05/2014 20:49:28 ******/
IF EXISTS (SELECT * FROM tempdb.sys.objects WHERE name = 'tmpWebCustomers' AND type in (N'U'))
DROP TABLE tempdb..tmpWebCustomers
CREATE TABLE tempdb..tmpWebCustomers
[Customer Number] varchar(6),
[Store Number] varchar(6),
[Company Name] varchar(35),
[Email Address] varchar(75),
[Password] varchar(20),
[Contact Name] varchar(20),
[Phone] varchar(20),
[Billing Address] varchar(40),
[Billing City] varchar(30),
[Billing State] varchar(2),
[Billing Zip] varchar(10),
[Billing Country] varchar(15),
[Shipping Address] varchar(40),
[Shipping City] varchar(30),
[Shipping State] varchar(2),
[Shipping Zip] varchar(10),
[Shipping Country] varchar(15),
[Payment Terms] varchar(1),
[Prepaid Freight Amount] decimal(14,4),
[Is Preferred] bit,
[Fuel Surcharge Exempt] bit,
[Sales Tax Addback] bit,
[Broken Box Exempt] bit,
[Canada Freight Exempt] bit,
[Furniture Handling Exempt] bit,
[Create At] datetime,
[Updated At] datetime,
[Sales Rep] varchar(50),
[Sales Rep Phone] varchar(15),
[Sales Rep Email] varchar(50),
[Inside Rep] varchar(50),
[Inside Rep Email] varchar(50),
[Parent] bit
--Insert All Non-National Account Customers--
INSERT INTO tempdb..tmpWebCustomers
SELECT
C.CUSTNO as 'Customer Number',
'' as 'Store Number',
C.COMPANY as 'Company Name',
RTRIM(C.EMAIL) as 'Email Address',
C.MISC6 as 'Password',
C.CONTACT as 'Contact Name',
C.PHONE as 'Phone',
C.ADDRESS1 as 'Billing Address',
C.CITY as 'Billing City',
C.STATE as 'Billing State',
C.ZIP as 'Billing Zip',
C.COUNTRY as 'Billing Country',
'' as 'Shipping Address',
'' as 'Shipping City',
'' as 'Shipping State',
'' as 'Shipping Zip',
'' as 'Shipping Country',
CASE
WHEN C.PTERMS='CREDIT CARD' THEN 1
WHEN C.PTERMS='CREDIT CART ONLY' THEN 1
WHEN C.PNET=0 THEN 0
ELSE 2
END as 'Payment Terms',
C.PPFREIGHT as 'Prepaid Freight Amount',
C.PRPRICE as 'Is Preferred',
C.FSEXEMPT as 'Fuel Surcharge Exempt',
C.STADDBACK as 'Sales Tax Addback',
C.BROKEN as 'Boken Box Exempt',
C.CANADAFREIGHT as 'Canada Freight Exempt',
C.FHEXEMPT as 'Furniture Handling Exempt',
C.ADDDATE as 'Created At',
C.LCKDATE as 'Updated At',
RTRIM(R.SFIRST) +' '+ RTRIM(R.SLAST) as 'Sales Rep',
R.PHONE as 'Sales Rep Phone',
CASE
WHEN R.EMAIL='[email protected]' then ''
ELSE R.EMAIL
END as 'Sales Rep Email',
RTRIM(I.SFIRST) +' '+ RTRIM(I.SLAST) as 'Inside Rep',
I.EMAIL as 'Inside Rep Email',
0
FROM tblARCUST C
INNER JOIN tblICSLSP R ON C.SALESMN=R.SLSMN
LEFT OUTER JOIN tblICSLSP I ON R.INSIDESALES=I.SLSMN
WHERE
C.NATION=0
AND C.ACTIVE=1
AND C.MISC6 !=''
AND C.EMAIL like '%@%'
--Populate Shipping Address Data--
UPDATE tempdb..tmpWebCustomers
SET
[Shipping Address]=RTRIM(S.ADDRESS1),
[Shipping City]=RTRIM(S.CITY),
[Shipping State]=RTRIM(S.STATE),
[Shipping Zip]=RTRIM(S.ZIP),
[Shipping Country]=RTRIM(S.COUNTRY)
from tempdb..tmpWebCustomers W
INNER JOIN tblARCADR S ON W.[Customer Number]=S.CUSTNO
WHERE S.DEFASHIP='Y'
UPDATE tempdb..tmpWebCustomers
SET
[Shipping Address]=[Billing Address],
[Shipping City]=[Billing City],
[Shipping State]=[Billing State],
[Shipping Zip]=[Billing Zip],
[Shipping Country]=[Billing Country]
WHERE
[Shipping Address]=''
--Insert National Account Customers
INSERT INTO tempdb..tmpWebCustomers
SELECT
C.CUSTNO as 'Customer Number',
S.CSHIPNO as 'Store Number',
S.COMPANY as 'Company Name',
RTRIM(S.EMAIL) as 'Email Address',
S.MISC6 as 'Password',
S.CONTACT as 'Contact Name',
S.PHONE as 'Phone',
C.ADDRESS1 as 'Billing Address',
C.CITY as 'Billing City',
C.STATE as 'Billing State',
C.ZIP as 'Billing Zip',
C.COUNTRY as 'Billing Country',
S.ADDRESS1 as 'Shipping Address',
S.CITY as 'Shipping City',
S.STATE as 'Shipping State',
S.ZIP as 'Shipping Zip',
S.COUNTRY as 'Shipping Country',
CASE
WHEN C.PTERMS='CREDIT CARD' THEN 1
WHEN C.PTERMS='CREDIT CART ONLY' THEN 1
WHEN C.PNET=0 THEN 0
ELSE 2
END as 'Payment Terms',
C.PPFREIGHT as 'Prepaid Freight Amount',
C.PRPRICE as 'Is Preferred',
C.FSEXEMPT as 'Fuel Surcharge Exempt',
C.STADDBACK as 'Sales Tax Addback',
C.BROKEN as 'Boken Box Exempt',
C.CANADAFREIGHT as 'Canada Freight Exempt',
C.FHEXEMPT as 'Furniture Handling Exempt',
S.ADDDATE as 'Created At',
S.LCKDATE as 'Updated At',
RTRIM(R.SFIRST) +' '+ RTRIM(R.SLAST) as 'Sales Rep',
R.PHONE as 'Sales Rep Phone',
CASE
WHEN R.EMAIL='[email protected]' then ''
ELSE R.EMAIL
END as 'Sales Rep Email',
RTRIM(I.SFIRST) +' '+ RTRIM(I.SLAST) as 'Inside Rep',
I.EMAIL as 'Inside Rep Email',
0
FROM tblARCUST C
INNER JOIN tblARCADR S ON C.CUSTNO=S.CUSTNO
INNER JOIN tblICSLSP R ON C.SALESMN=R.SLSMN
LEFT OUTER JOIN tblICSLSP I ON R.INSIDESALES=I.SLSMN
WHERE
C.NATION=1
AND C.ACTIVE=1
AND S.MISC6 !=''
AND S.EMAIL LIKE '%@%'
--Insert National Account Parents
INSERT INTO tempdb..tmpWebCustomers
SELECT
C.CUSTNO as 'Customer Number',
'' as 'Store Number',
C.COMPANY as 'Company Name',
RTRIM(C.EMAIL) as 'Email Address',
C.MISC6 as 'Password',
C.CONTACT as 'Contact Name',
C.PHONE as 'Phone',
C.ADDRESS1 as 'Billing Address',
C.CITY as 'Billing City',
C.STATE as 'Billing State',
C.ZIP as 'Billing Zip',
C.COUNTRY as 'Billing Country',
C.ADDRESS1 as 'Shipping Address',
C.CITY as 'Shipping City',
C.STATE as 'Shipping State',
C.ZIP as 'Shipping Zip',
C.COUNTRY as 'Shipping Country',
CASE
WHEN C.PTERMS='CREDIT CARD' THEN 1
WHEN C.PTERMS='CREDIT CART ONLY' THEN 1
WHEN C.PNET=0 THEN 0
ELSE 2
END as 'Payment Terms',
C.PPFREIGHT as 'Prepaid Freight Amount',
C.PRPRICE as 'Is Preferred',
C.FSEXEMPT as 'Fuel Surcharge Exempt',
C.STADDBACK as 'Sales Tax Addback',
C.BROKEN as 'Boken Box Exempt',
C.CANADAFREIGHT as 'Canada Freight Exempt',
C.FHEXEMPT as 'Furniture Handling Exempt',
C.ADDDATE as 'Created At',
C.LCKDATE as 'Updated At',
RTRIM(R.SFIRST) +' '+ RTRIM(R.SLAST) as 'Sales Rep',
R.PHONE as 'Sales Rep Phone',
CASE
WHEN R.EMAIL='[email protected]' then ''
ELSE R.EMAIL
END as 'Sales Rep Email',
RTRIM(I.SFIRST) +' '+ RTRIM(I.SLAST) as 'Inside Rep',
I.EMAIL as 'Inside Rep Email',
1
FROM tblARCUST C
INNER JOIN tblICSLSP R ON C.SALESMN=R.SLSMN
LEFT OUTER JOIN tblICSLSP I ON R.INSIDESALES=I.SLSMN
WHERE
C.NATION=1
AND C.ACTIVE=1
AND C.MISC6 !=''
AND C.EMAIL like '%@%'
end
GOCant spot anything obvious
Are you sure you're running this in a new window? Make sure there's not any other bits of code present in window where you're running this.
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page -
Matching table cell colors?
Using 5.2 (1860) I have a table and I can not match the colors of some of my cells. Is there an easy way to select the formatting of a cell and just copy it to another cell? When I select the color options for the cells I want to change, the light grey option is not there. See the attached image. I want to simply copy the lighter grey cell color so it spans the entire 2nd and 4th rows.
Thanks in advance!Once you have a cell color set, you can make adjacent cells the same color by clicking in the cell with the color, and then roll your mouse pointer over the edge of the cell in the direction you want to propagate the cell color. When you see a yellow dot appear on the cell boundary, click and drag in the direction of the cells whose color are to match the original cell color.
For non-adjacent cells, click in the cell with the color you want to replicate. In the Format > Cell panel, click Fill, and choose Color Fill. Click on the color globe, and use the hand lens icon to capture the original color into the color chooser. This is now the fill color. Click on the non-adjacent cell you want to color, and reselect Color Fill from the Cell panel. The cell will fill with the specified color. Repeat paragraph one as needed.
If you want to fill an entire row with the same color, click on the row number (or range of cells using the shift key) so that the entire row is selected. Then choose Cell > Color Fill and the row will be set to the specified color. -
Getting Spry Bar Color to Match Table Color
I have a table at the top of my page and a spry bar within it. I'd like for the colors to match but I can't seem to figure out how. If possible, I'd like them both to be a light gray.
http://www.hardgeared.com/TempPage-2.html
Thanks for your help and guidance.Online 187 of HTML code view, change this:
<body text="#FF0000" class="footer"
width: 100%>
to this:
<body>
On line 201, change this:
<table width="959" border="0" background="999999">
to this:
<table width="959" border="0" style="background-color: #999999">
Which background colors do you want for Spry Menu and tables?
Nancy O. -
/*FIRST TABLE*/
create table Employee1(
empid int,
empname varchar(20),
salary int,
gender varchar(10),
depid int)
insert into Employee1 values(1,'jitendra',500000,'m',100)
/*2 ND TABLE*/
create table audit(
empid int,
auditdata varchar(50))
NOW I AM APPLYING TRIGGER
/* triggers demo for after insert*/
alter trigger tr_employee1_insert
on Employee1 for insert
as begin
declare @id int
select @id=empid from inserted
insert into audit values ('new employee is inserted with id=' + CAST(@id as nvarchar(5))+'is added at'+CAST(GETDATE() as nvarchar(20)))
end
insert into employee1 values (9,'shubham',110000,'m',200)
PLEASE HELP ME TO SOLVEdeclare @id int
select @id=empid from inserted
insert into audit values ('new employee is inserted with id=' + CAST(@id as nvarchar(5))+'is added at'+CAST(GETDATE() as nvarchar(20)))
This code will not properly handle a multi-row insert. I suggest an approach like the example below instead of scalar variables. Also, I suggest you just store the normalized data in the audit table (id, action, timestamp) instead of the
formatted string. That will facilitate subsequent queries and reporting on the data.
ALTER TRIGGER tr_employee1_insert
ON dbo.Employee1 FOR INSERT
AS
INSERT INTO dbo.audit (empid, auditdata)
SELECT
id
, 'new employee is inserted with id=' + CAST(id as nvarchar(5)) + 'is added at ' + CAST(GETDATE() as nvarchar(20))
FROM inserted;
GO
Dan Guzman, SQL Server MVP, http://www.dbdelta.com -
Ascii table - character matching table
Where can I find a character mapping table for character set WE8ISO8859P1
Olav Torvund
[email protected]Hi,
that's odd. I got all of them 255 total. Here is a portion of it.
CHR dec
Y 89
Z 90
[ 91
\ 92
] 93
^ 94
_ 95
` 96
a 97
b 98
c 99
CHR dec
d 100
e 101
f 102
g 103
h 104
i 105
j 106
k 107
l 108
m 109
n 110
CHR dec
---- ----------U -
Hi,
I should remember this but . . . bug with t-sql using Insert Into on a temp table. It is unhappy with fields I'm trying to insert.
It's probably the fact that I'm trying to using some default data w/ aliases for a couple of the fields.
Have a look at code please, and tell me how to correct. Thanks!
DECLARE @OrderNo varchar(6)
USE tempdb;
set @OrderNo = '909773' ;
IF OBJECT_ID ('#tmpNCGLITEMS') IS NOT NULL --how to get this to work with SSMS w/o reloading the qry window. i.e. how to release to delete????
DROP TABLE #tmpNCGLItems
use DEV_ORDERS;
SELECT distinct od.lline as OrdLine, od.ldrcolor as ClrCode, od.ldrspec as SpecCode, ad.Addon_Mod_GL_Acct as ncGLCode
INTO #tmpNCGLItems
FROM OODETL od
INNER JOIN [Dev_Products].[dbo].[Addon_Master] ad on od.lfg = ad.Addon_Mod_Mod_Code_ID AND ad.Addon_Mod_A_C_D_ID = 'C'
WHERE od.LOrder = @OrderNo and ad.Addon_Mod_GL_Acct is not null
select * from #tmpNCGLItems
USE tempdb;
IF OBJECT_ID ('#tmpNCGLITEMS1') IS NOT NULL
DROP TABLE #tmpNCGLItems1
USE DEV_ORDERS;
CREATE TABLE [dbo].[#tmpNCGLItems1](
[OrdLine] [char](4) NOT NULL,
[ClrCode] [char](6) NULL,
[SpecCode] [varchar](6) NULL,
[ClrUPorDiscAmt] money NULL, [SpecUPorDiscAmt] money NULL,
[ncGLCode] [varchar](10) NULL, [lPrice] money Null
) ON [PRIMARY]
--insert into below is failing. Says fields don't match----Msg 213, Level 16, State 1, Line 33
--Insert Error: Column name or number of supplied values does not match table definition.
--but. . . I think I have 7 fields and I think the datatypes match?
INSERT INTO #tmpNCGLItems1
SELECT ordLine, ClrCode, SpecCode, 0 as [ClrUPorDiscAmt], 0 as [SpecUPorDiscAmt], ncGLCode,
SUM(od.lextendprice) as lPrice
FROM #tmpNCGLItems tmp JOIN OODETL od on tmp.OrdLine = od.lline
WHERE od.lorder = @OrderNo
GROUP BY ordLine, ClrCode, SpecCode, NcGLCode>> I should remember this but . . . bug with T-SQL using Insert Into on a temp table. It is unhappy with fields [sic] I'm trying to insert. It's probably the fact that I'm trying to using some default data w/ aliases for a couple
of the fields [sic: columns are not fields]. <<
Temp tables are how a bad programmer fakes a scratch tape so his SQL can look like magnetic tape files. We do not like to materialize data on the disk unless we have to.
And data element do not change names from table to table in a schema! Get rid of the aliases, even tho they are closer to ISO-11179 than the base table crap.
But you are an old FORTRAN programmer! Your "OODETL” is six uppercase letters as required by FORTRAN I; an SQL programmer would have used something like “Order_Details” instead. The mix of camelCase, FORTRAN and several other non-SQL languages is scary.
Why did you use MONEY? It is not portable and the math is wrong. Google it! Why do you think that “<something>_code_id” makes any sense? A data element can be a “<something>_code” or a “<something>_id” but never that hybrid disaster.
I would do this with VIEWs so that I know the data is always current.
CREATE VIEW NC_GL_Items (..)
AS
SELECT DISTINCT OD.l_line, OD.ldr_color, OD.ldr_spec,
AD.addon_mod_gl_acct
FROM Oodetl AS OD,
Addon_Master AS AD
WHERE ..;
The SELECT DISTINCT should not be there. An account should not be NULL, etc. Why do you have more nulls in one table than entire accounting systems? Why do you set integer zero to an amount, which should be a decimal for money?
This is a crazy quilt that is clearly a bitch to maintain or even read. Can you clean it up or are you screwed?
--CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
in Sets / Trees and Hierarchies in SQL -
GTC Error While Provisioning to Oracle Database Tables
I'm trying to setup GTC connector to provisioning/reconcile users into database tables, but during the provisionig gtc fails. check the lines above to see the error
ERROR,07 Nov 2010 20:18:38,383,[OIMCP.DATC],Class/Method: DBProvisioningTransportProvider/sendData encounter some problems: Attribute: matricula does not exist in the specified parent table/view: xladm.usuarios_view
com.thortech.xl.gc.exception.DBException: Attribute: matricula does not exist in the specified parent table/view: xladm.usuarios_view
matricula is the primary key
I'm using OIM 9102 with bundle patch 12 appled. connector version is 9105. Oracle database version is 11.1.0.7. My platform is Windows 2003.
database table's ddl
create table usuarios (
matricula varchar2(10) primary key,
nome varchar2(80),
status varchar2(20),
ultima_atualizacao date,
senha varchar2(20));
create view usuarios_view as select * from usuarios;
GTC Connector Setup
Provide Basic Information View
Name INFO
Reconciliation
Transport Provider Database Application Tables Reconciliation
Format Provider Database Application Tables Reconciliation
Trusted Source Reconciliation No
Provisioning
Transport Provider Database Application Tables Provisioning
Format Provider Database Application Tables Provisioning
Specify Parameter Values Change
Database Driver oracle.jdbc.driver.OracleDriver
Database URL jdbc:oracle:thin:@localhost:1521:orcl
Database User ID xladm
Database Password ********
Customized Query
Use Native Query No
Connection Properties
Parent Table/View Name usuarios_view
Child Table/View Names
Unique Attribute matricula
Timestamp Attribute ultima_atualizacao
Database Date format
Status Attribute status
Status Lookup Code Lookup.InfoGolden.Status
Is Primary Key Auto Incremented No
Target Date Format yyyy-MM-dd hh:mm:ss.fffffffff
Batch Size All
Stop Reconciliation Threshold None
Stop Threshold Minimum Records None
Source Date Format yyyy/MM/dd hh:mm:ss z
Reconcile Deletion of Multivalued Attribute Data Yes
Reconciliation Type Full
error log
Running GENERICADAPTER
Target Class = com.thortech.xl.gc.runtime.GCAdapterLibrary
DEBUG,07 Nov 2010 20:18:37,086,[OIMCP.DATC],Class/Method: DBReconFormatProvider/formatData entered.
DEBUG,07 Nov 2010 20:18:37,086,[OIMCP.DATC],Class/Method: DBProvisioningTransportProvider/initialize entered.
DEBUG,07 Nov 2010 20:18:37,086,[OIMCP.DATC],Class/Method: DBProvisioningTransportProvider/initialize - Data: driver - Value: oracle.jdbc.driver.OracleDriver
DEBUG,07 Nov 2010 20:18:37,086,[OIMCP.DATC],Class/Method: DBProvisioningTransportProvider/initialize - Data: url - Value: jdbc:oracle:thin:@localhost:1521:orcl
DEBUG,07 Nov 2010 20:18:37,086,[OIMCP.DATC],Class/Method: DBProvisioningTransportProvider/initialize - Data: username - Value: xladm
DEBUG,07 Nov 2010 20:18:37,086,[OIMCP.DATC],Class/Method: DBProvisioningTransportProvider/initialize - Data: password - Value: *******
DEBUG,07 Nov 2010 20:18:37,086,[OIMCP.DATC],Class/Method: DBProvisioningTransportProvider/initialize - Data: parentContainerName - Value: usuarios_view
DEBUG,07 Nov 2010 20:18:37,086,[OIMCP.DATC],Class/Method: DBReconTransportProvider/convertCSVToArraylist entered.
DEBUG,07 Nov 2010 20:18:37,086,[OIMCP.DATC],Class/Method: DBReconTransportProvider/convertCSVToArraylist - Data: Run Time Parameters - Value: []
DEBUG,07 Nov 2010 20:18:37,086,[OIMCP.DATC],Class/Method: DBProvisioningTransportProvider/initialize - Data: childContainerTableNames - Value: []
DEBUG,07 Nov 2010 20:18:37,086,[OIMCP.DATC],Class/Method: DBProvisioningTransportProvider/initialize - Data: parentContainerUniqueKey - Value: matricula
DEBUG,07 Nov 2010 20:18:37,086,[OIMCP.DATC],Class/Method: DBProvisioningTransportProvider/initialize - Data: statusField - Value: status
DEBUG,07 Nov 2010 20:18:37,086,[OIMCP.DATC],Class/Method: DBProvisioningTransportProvider/initialize - Data: statusFieldLookup - Value: Lookup.InfoGolden.Status
DEBUG,07 Nov 2010 20:18:37,086,[OIMCP.DATC],Class/Method: DBProvisioningTransportProvider/initialize left.
DEBUG,07 Nov 2010 20:18:37,086,[OIMCP.DATC],Class/Method: DBProvisioningTransportProvider/initialize - Data: dbDateFormat - Value:
DEBUG,07 Nov 2010 20:18:37,086,[OIMCP.DATC],Class/Method: DBProvisioningTransportProvider/sendData entered.
INFO,07 Nov 2010 20:18:37,086,[OIMCP.DATC],Within PROV_OPERATION_ADDUSER::statusField=status
DEBUG,07 Nov 2010 20:18:37,117,[OIMCP.DATC],Class/Method: DBFacade/getConnectionProp entered.
DEBUG,07 Nov 2010 20:18:37,117,[OIMCP.DATC],Class/Method: DBFacade/setUpSSLPropertiesForDB2 entered.
DEBUG,07 Nov 2010 20:18:37,117,[OIMCP.DATC],ExitingMethodDebug
INFO,07 Nov 2010 20:18:37,148,[OIMCP.DATC],dbType:::: = Oracle
DEBUG,07 Nov 2010 20:18:37,148,[OIMCP.DATC],Class/Method: DBFacade/getMatchingSchemaName - Data: found matching schema - Value: XLADM
DEBUG,07 Nov 2010 20:18:37,148,[OIMCP.DATC],Class/Method: DBFacade/getMatchingTableName - Data: found exact matching schema:- - Value: XLADM
DEBUG,07 Nov 2010 20:18:37,227,[OIMCP.DATC],Class/Method: DBFacade/getMatchingTableName - Data: found matching tables - Value: USUARIOS_VIEW
DEBUG,07 Nov 2010 20:18:37,227,[OIMCP.DATC],Class/Method: DBFacade/getMatchingTableName - Data: found exact matching table:- - Value: USUARIOS_VIEW
INFO,07 Nov 2010 20:18:37,258,[OIMCP.DATC],dbType:::: = Oracle
DEBUG,07 Nov 2010 20:18:37,273,[OIMCP.DATC],Class/Method: DBFacade/getMatchingSchemaName - Data: found matching schema - Value: XLADM
DEBUG,07 Nov 2010 20:18:37,273,[OIMCP.DATC],Class/Method: DBFacade/getMatchingTableName - Data: found exact matching schema:- - Value: XLADM
DEBUG,07 Nov 2010 20:18:37,336,[OIMCP.DATC],Class/Method: DBFacade/getMatchingTableName - Data: found matching tables - Value: USUARIOS_VIEW
DEBUG,07 Nov 2010 20:18:37,336,[OIMCP.DATC],Class/Method: DBFacade/getMatchingTableName - Data: found exact matching table:- - Value: USUARIOS_VIEW
INFO,07 Nov 2010 20:18:37,445,[OIMCP.DATC],dbType:::: = Oracle
INFO,07 Nov 2010 20:18:37,445,[OIMCP.DATC],dbType:::: = Oracle
DEBUG,07 Nov 2010 20:18:37,445,[OIMCP.DATC],Class/Method: DBFacade/getMatchingSchemaName - Data: found matching schema - Value: XLADM
DEBUG,07 Nov 2010 20:18:37,445,[OIMCP.DATC],Class/Method: DBFacade/getMatchingTableName - Data: found exact matching schema:- - Value: XLADM
DEBUG,07 Nov 2010 20:18:37,523,[OIMCP.DATC],Class/Method: DBFacade/getMatchingTableName - Data: found matching tables - Value: USUARIOS_VIEW
DEBUG,07 Nov 2010 20:18:37,523,[OIMCP.DATC],Class/Method: DBFacade/getMatchingTableName - Data: found exact matching table:- - Value: USUARIOS_VIEW
DEBUG,07 Nov 2010 20:18:38,367,[OIMCP.DATC],Class/Method: DBFacade/getPrimaryKeys - Data: Primary Keys - Value: []
DEBUG,07 Nov 2010 20:18:38,383,[OIMCP.DATC],Class/Method: DBFacade/getColumns - Data: Column Name: - Value: MATRICULA
DEBUG,07 Nov 2010 20:18:38,383,[OIMCP.DATC],Class/Method: DBFacade/getColumns - Data: Column Dataype integer value: - Value: 12
DEBUG,07 Nov 2010 20:18:38,383,[OIMCP.DATC],Class/Method: DBFacade/getColumns - Data: Column Size: - Value: 10
DEBUG,07 Nov 2010 20:18:38,383,[OIMCP.DATC],Class/Method: DBFacade/getColumns - Data: Table Name: - Value: USUARIOS_VIEW
DEBUG,07 Nov 2010 20:18:38,383,[OIMCP.DATC],Class/Method: DBFacade/getClumns - Data: Column Datatype Name: - Value: VARCHAR2
DEBUG,07 Nov 2010 20:18:38,383,[OIMCP.DATC],Class/Method: DBFacade/getColumns - Data: Database Type Name: - Value: Oracle
DEBUG,07 Nov 2010 20:18:38,383,[OIMCP.DATC],Class/Method: DBFacade/getColumns - Data: Column Name: - Value: NOME
DEBUG,07 Nov 2010 20:18:38,383,[OIMCP.DATC],Class/Method: DBFacade/getColumns - Data: Column Dataype integer value: - Value: 12
DEBUG,07 Nov 2010 20:18:38,383,[OIMCP.DATC],Class/Method: DBFacade/getColumns - Data: Column Size: - Value: 80
DEBUG,07 Nov 2010 20:18:38,383,[OIMCP.DATC],Class/Method: DBFacade/getColumns - Data: Table Name: - Value: USUARIOS_VIEW
DEBUG,07 Nov 2010 20:18:38,383,[OIMCP.DATC],Class/Method: DBFacade/getClumns - Data: Column Datatype Name: - Value: VARCHAR2
DEBUG,07 Nov 2010 20:18:38,383,[OIMCP.DATC],Class/Method: DBFacade/getColumns - Data: Database Type Name: - Value: Oracle
DEBUG,07 Nov 2010 20:18:38,383,[OIMCP.DATC],Class/Method: DBFacade/getColumns - Data: Column Name: - Value: STATUS
DEBUG,07 Nov 2010 20:18:38,383,[OIMCP.DATC],Class/Method: DBFacade/getColumns - Data: Column Dataype integer value: - Value: 12
DEBUG,07 Nov 2010 20:18:38,383,[OIMCP.DATC],Class/Method: DBFacade/getColumns - Data: Column Size: - Value: 20
DEBUG,07 Nov 2010 20:18:38,383,[OIMCP.DATC],Class/Method: DBFacade/getColumns - Data: Table Name: - Value: USUARIOS_VIEW
DEBUG,07 Nov 2010 20:18:38,383,[OIMCP.DATC],Class/Method: DBFacade/getClumns - Data: Column Datatype Name: - Value: VARCHAR2
DEBUG,07 Nov 2010 20:18:38,383,[OIMCP.DATC],Class/Method: DBFacade/getColumns - Data: Database Type Name: - Value: Oracle
DEBUG,07 Nov 2010 20:18:38,383,[OIMCP.DATC],Class/Method: DBFacade/getColumns - Data: Column Name: - Value: ULTIMA_ATUALIZACAO
DEBUG,07 Nov 2010 20:18:38,383,[OIMCP.DATC],Class/Method: DBFacade/getColumns - Data: Column Dataype integer value: - Value: 93
DEBUG,07 Nov 2010 20:18:38,383,[OIMCP.DATC],Class/Method: DBFacade/getColumns - Data: Column Size: - Value: 7
DEBUG,07 Nov 2010 20:18:38,383,[OIMCP.DATC],Class/Method: DBFacade/getColumns - Data: Table Name: - Value: USUARIOS_VIEW
DEBUG,07 Nov 2010 20:18:38,383,[OIMCP.DATC],Class/Method: DBFacade/getClumns - Data: Column Datatype Name: - Value: DATE
DEBUG,07 Nov 2010 20:18:38,383,[OIMCP.DATC],Class/Method: DBFacade/getColumns - Data: Database Type Name: - Value: Oracle
DEBUG,07 Nov 2010 20:18:38,383,[OIMCP.DATC],Class/Method: DBFacade/getColumns - Data: Column Name: - Value: SENHA
DEBUG,07 Nov 2010 20:18:38,383,[OIMCP.DATC],Class/Method: DBFacade/getColumns - Data: Column Dataype integer value: - Value: 12
DEBUG,07 Nov 2010 20:18:38,383,[OIMCP.DATC],Class/Method: DBFacade/getColumns - Data: Column Size: - Value: 20
DEBUG,07 Nov 2010 20:18:38,383,[OIMCP.DATC],Class/Method: DBFacade/getColumns - Data: Table Name: - Value: USUARIOS_VIEW
DEBUG,07 Nov 2010 20:18:38,383,[OIMCP.DATC],Class/Method: DBFacade/getClumns - Data: Column Datatype Name: - Value: VARCHAR2
DEBUG,07 Nov 2010 20:18:38,383,[OIMCP.DATC],Class/Method: DBFacade/getColumns - Data: Database Type Name: - Value: Oracle
DEBUG,07 Nov 2010 20:18:38,383,[OIMCP.DATC],Class/Method: DBFacade/getClumns - Data: Columns: - Value: [com.thortech.xl.gc.impl.common.Column@187f99a, com.thortech.xl.gc.impl.common.Column@1428b7, com.thortech.xl.gc.impl.common.Column@17d39b5, com.thortech.xl.gc.impl.common.Column@57cf27, com.thortech.xl.gc.impl.common.Column@e1319f]
ERROR,07 Nov 2010 20:18:38,383,[OIMCP.DATC],Class/Method: DBProvisioningTransportProvider/sendData encounter some problems: Attribute: matricula does not exist in the specified parent table/view: xladm.usuarios_view
com.thortech.xl.gc.exception.DBException: Attribute: matricula does not exist in the specified parent table/view: xladm.usuarios_view
at com.thortech.xl.gc.impl.common.DBFacade.validateAttrExistence(Unknown Source)
at com.thortech.xl.gc.impl.common.DBFacade.getSchema(Unknown Source)
at com.thortech.xl.gc.impl.prov.DBProvisioningTransportProvider.getSchema(Unknown Source)
at com.thortech.xl.gc.impl.prov.DBProvisioningTransportProvider.sendData(Unknown Source)
at com.thortech.xl.gc.runtime.GCAdapterLibrary.executeFunctionality(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.thortech.xl.adapterGlue.ScheduleItemEvents.adpINFO_GTC.GENERICADAPTER(adpINFO_GTC.java:125)
at com.thortech.xl.adapterGlue.ScheduleItemEvents.adpINFO_GTC.implementation(adpINFO_GTC.java:70)
at com.thortech.xl.client.events.tcBaseEvent.run(Unknown Source)
at com.thortech.xl.dataobj.tcDataObj.runEvent(Unknown Source)
at com.thortech.xl.dataobj.tcScheduleItem.runMilestoneEvent(Unknown Source)
at com.thortech.xl.dataobj.tcScheduleItem.eventPostInsert(Unknown Source)
at com.thortech.xl.dataobj.tcDataObj.insert(Unknown Source)
at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
at com.thortech.xl.ejb.beansimpl.tcProvisioningOperationsBean.retryTasks(Unknown Source)
at com.thortech.xl.ejb.beans.tcProvisioningOperationsSession.retryTasks(Unknown Source)
at com.thortech.xl.ejb.beans.tcProvisioningOperations_b03yxm_EOImpl.retryTasks(tcProvisioningOperations_b03yxm_EOImpl.java:2719)
at Thor.API.Operations.tcProvisioningOperationsClient.retryTasks(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.security.Security.runAs(Security.java:41)
at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(Unknown Source)
at Thor.API.Base.SecurityInvocationHandler.invoke(Unknown Source)
at $Proxy93.retryTasks(Unknown Source)
at com.thortech.xl.webclient.actions.ResourceProfileProvisioningTasksAction.retryTasks(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
at com.thortech.xl.webclient.actions.tcLookupDispatchAction.execute(Unknown Source)
at com.thortech.xl.webclient.actions.tcActionBase.execute(Unknown Source)
at com.thortech.xl.webclient.actions.tcAction.execute(Unknown Source)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at com.thortech.xl.webclient.security.CSRFFilter.doFilter(Unknown Source)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at com.thortech.xl.webclient.security.SecurityFilter.doFilter(Unknown Source)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)What I usually do in situations like this is that I connect to the database using a sql client and the same connection information as I specified to OIM and see if the attribute is present.
Perhaps you got the wrong db name? Or schema name?
Everything looks good so most probably there simply is some little typo somewhere.
Hope this helps
/Martin -
Do you need to generate HTML table rows from XML in InDesign?
General issue: you export XML and you get a bunch of content for xml elements that were a table in inDesign. But they don't have any rows, just cell after cell. What will make rows in your output?
Solution: XSLT; you need to use the @aid:tcols attribute of exported XML to determine the number of columns that your table should be. This is written in XSLT 1.1 so it shoud work with an export from InDesign. If you have problems with using it on export of XML, try using it on the XML afetr it has been exported, in Oxygen or other XSLT processor. Best to save acopy of your files before using the XSLT with them. Copy all of the plain text and past into a new file, save with your own filename, ending with .xsl file extension. Then when exporting XML from InDesign CS3-5, browse to your new .xsl file and select it. PLEASE read about XSLT files at w3c.schools or other resource if you want to understand what is going on with this file.
BTW <!-- indicates comments in code -->
<?xml version="1.0" encoding="UTF-8"?>
<!-- NO WARRANTY that this example code will work as written for your XML file in InDesign. You can add more templates to the output to map your heading styles to h1, h2, etc. -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.1"
xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/"
xmlns:aid5="http://ns.adobe.com/AdobeInDesign/5.0/" exclude-result-prefixes="xsl aid aid5">
<xsl:output method="html" indent="yes" encoding="UTF-8"
doctype-public="http://www.w3.org/TR/xhtml/DTD/xhtml-transitional.dtd"/>
<!-- parameter to use the name of element with attribute aid:theader as the th output -->
<xsl:param name="tableElem">//*[local-name()][@aid:table='table']</xsl:param>
<xsl:param name="colheadStyle">
<xsl:value-of select="//*[local-name()][@aid:theader][1]"/>
<!-- i.e. colHead-->
</xsl:param>
<!-- parameter to use the name of element with attribute aid:cell but not aid:theader as the td output -->
<!--i.e. tabletext or whatever the name of your Cell level element is in InDesign -->
<xsl:param name="cellStyle">
<xsl:value-of select="//*[local-name()][@aid:table='cell' and not(@aid:theader)][1]"/>
</xsl:param>
<!-- handles a Story element marked up with HTML-type elements, but uses the <Table> element of IDD -->
<!-- if a true HTML table is in the content, it will be passed through -->
<xsl:template match="Story"><!-- make a basic HTML file from a Story -->
<html>
<head>
<title>Sample Table</title>
</head>
<body>
<xsl:apply-templates><!-- will handle direct text of the <Story>, and <Table> -->
<xsl:with-param name="colheadStyle" select="$colheadStyle"/>
<xsl:with-param name="cellStyle" select="$cellStyle"/>
</xsl:apply-templates>
</body>
</html>
</xsl:template>
<!-- use the styles to find the elements of IDD <Table> element -->
<xsl:template match="Table">
<xsl:param name="colheadStyle">
<xsl:value-of select="$colheadStyle"/>
</xsl:param>
<xsl:param name="cellStyle">
<xsl:value-of select="$cellStyle"/>
</xsl:param>
<xsl:variable name="cellsPerRow">
<xsl:value-of select="@aid:tcols"/>
</xsl:variable>
<table><!-- start the table -->
<!-- xhtml requires lower-case name for table element-->
<tr>
<xsl:apply-templates select="*[@aid:theader='']">
<xsl:with-param name="colheadStyle" select="$colheadStyle"/>
<xsl:with-param name="cellStyle" select="$cellStyle"/>
</xsl:apply-templates>
</tr>
<!-- and @aid:style=$cellStyle -->
<xsl:for-each
select="*[@aid:table='cell'][not(@aid:theader='')][position() mod $cellsPerRow = 1]">
<!-- some code adapted with permission, from http://www.computorcompanion.com/LPMArticle.asp?ID=202
Building HTML Tables with XSL by James Byrd; please include this acknowledgement in all files that use his code -->
<!-- this is the tricky bit of the code that James Byrd set up
p-class-tabletext-[position() mod $cellsPerRow = 1 continues looping until the position of the active element divided by $cellperRow (@aid:tcols value) tried with [@aid:style=$cellStyle] has a remainder of 1 -->
<!-- .|following-sibling::p-class-tabletext-[position() < $cellsPerRow] applies first to the currently selects cell with "." then continues with the following-siblings whose position is less than the value of cells per row (@aid:tcols value) -->
<tr>
<xsl:apply-templates
select=".|following-sibling::*[@aid:table='cell'][not(@aid:theader='')][position() < $cellsPerRow]"
/>
</tr>
</xsl:for-each>
</table>
</xsl:template>
<xsl:template match="*">
<xsl:param name="colheadStyle">
<xsl:value-of select="$colheadStyle"/>
</xsl:param>
<xsl:param name="cellStyle">
<xsl:value-of select="$cellStyle"/>
</xsl:param>
<xsl:variable name="cellsPerRow">
<xsl:value-of select="parent::Table/@aid:tcols"/>
</xsl:variable>
<xsl:choose>
<!-- colHead aid:table="cell" aid:theader=""-->
<xsl:when test="parent::Table and @aid:theader">
<th>
<xsl:apply-templates>
<xsl:with-param name="colheadStyle" select="$colheadStyle"/>
<xsl:with-param name="cellStyle" select="$cellStyle"/>
</xsl:apply-templates>
</th>
<xsl:if test="(position() = last()) and (position() < $cellsPerRow)">
<xsl:call-template name="FillerCells">
<xsl:with-param name="cellCount" select="$cellsPerRow - position()"/>
</xsl:call-template>
</xsl:if>
</xsl:when>
<xsl:when test="parent::Table and @aid:table='cell' and not(@aid:theader)">
<td>
<xsl:apply-templates>
<xsl:with-param name="colheadStyle" select="$colheadStyle"/>
<xsl:with-param name="cellStyle" select="$cellStyle"/>
</xsl:apply-templates>
</td>
<xsl:if test="(position() = last()) and (position() < $cellsPerRow)">
<xsl:call-template name="FillerCells">
<xsl:with-param name="cellCount" select="$cellsPerRow - position()"/>
</xsl:call-template>
</xsl:if>
</xsl:when>
<!-- for non-table elements this generic element handler will pick up an aid:pstyle (if present) and create a class attribute from it. Works for any element that has the same name as HTML element such as <p> but it doesn't add wrapper elements like <ul> or <ol> for lists. -->
<xsl:otherwise>
<xsl:element name="{name()}">
<xsl:if test="@aid:pstyle">
<xsl:attribute name="class">
<xsl:value-of select="@aid:ptyle"/>
</xsl:attribute>
</xsl:if>
<xsl:apply-templates>
<xsl:with-param name="colheadStyle" select="$colheadStyle"/>
<xsl:with-param name="cellStyle" select="$cellStyle"/>
</xsl:apply-templates>
</xsl:element>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- take care of text that is a direct child of the <Story> by wrapping it in a <p> to make valid HTML -->
<xsl:template match="text()">
<xsl:variable name="myString">
<xsl:value-of select="string-length(normalize-space(.))"/>
</xsl:variable>
<xsl:choose>
<xsl:when test="parent::Story">
<xsl:if test="$myString > 0">
<xsl:element name="p">
<xsl:attribute name="class">text</xsl:attribute>
<xsl:value-of select="normalize-space(.)"/>
</xsl:element>
</xsl:if>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="normalize-space(.)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- make br element conform to good HTML markup -->
<xsl:template match="br">
<br />
</xsl:template>
<!-- this recursive template calls itself until its test condition is satified -->
<!-- it outputs a cell whose only content is a non-breaking space -->
<!-- do not use in place of Unicode   for the non-breaking space -->
<!-- the value of $cellCount is set in the main XSL template -->
<xsl:template name="FillerCells">
<xsl:param name="cellCount"/>
<td> </td>
<xsl:if test="$cellCount > 1">
<xsl:call-template name="FillerCells">
<xsl:with-param name="cellCount" select="$cellCount - 1"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
Message was edited by: HoneoyeFalls
Sample XML file exported from IDD
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Story><Table xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/" xmlns:aid5="http://ns.adobe.com/AdobeInDesign/5.0/" aid:table="table" aid:trows="2" aid:tcols="2"><colHead aid:table="cell" aid:theader="" aid:crows="1" aid:ccols="1" aid:ccolwidth="44">1 colHead</colHead><colHead aid:table="cell" aid:theader="" aid:crows="1" aid:ccols="1" aid:ccolwidth="56">2 colHead</colHead><tabletext aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="44">1 tabletext</tabletext><tabletext aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="56">2 tabletext</tabletext><tabletext aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="44">row 2 1 tabletext</tabletext><tabletext aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="56">row 2 2 tabletext</tabletext></Table>
<table><tr><th>normal HTML table heading</th></tr>
<tr><td>normal HTML table<br/>cell text</td></tr></table></Story>You can use RECORD type declaration:
SQL> declare
2 type rec_type is record (
3 ename emp.ename%type,
4 sal emp.sal%type
5 );
6 type rc is ref cursor return rec_type;
7 rc1 rc;
8 rec1 rec_type;
9 begin
10 open rc1 for select ename, sal from emp;
11 loop
12 fetch rc1 into rec1;
13 exit when rc1%notfound;
14 dbms_output.put_line(rec1.ename || ' ' || rec1.sal);
15 end loop;
16 close rc1;
17 end;
18 /
SMITH 800
ALLEN 1600
WARD 1250
JONES 2975
MARTIN 1250
BLAKE 2850
CLARK 2450
SCOTT 3000
KING 5000
TURNER 1500
ADAMS 1100
JAMES 950
FORD 3000
MILLER 1300or use, for example, VIEW to declare rowtype:
SQL> create view dummy_view as select ename, sal from emp;
View created.
SQL> declare
2 type rc is ref cursor return dummy_view%rowtype;
3 rc1 rc;
4 rec1 dummy_view%rowtype;
5 begin
6 open rc1 for select ename, sal from emp;
7 loop
8 fetch rc1 into rec1;
9 exit when rc1%notfound;
10 dbms_output.put_line(rec1.ename || ' ' || rec1.sal);
11 end loop;
12 close rc1;
13 end;
14 /
SMITH 800
ALLEN 1600
WARD 1250
JONES 2975
MARTIN 1250
BLAKE 2850
CLARK 2450
SCOTT 3000
KING 5000
TURNER 1500
ADAMS 1100
JAMES 950
FORD 3000
MILLER 1300 Rgds. -
Hi,
I'm having a real problem with trying to get my xslt stylesheet to produce a html table.
I want the table to look something like the following:
|radio-button description | radio-button description |
|radio-button description | radio-button description |
|_________________________________________|
So that each table row has the following:
<tr><td>radio-button</td><td>decsription</td>
<td>radio-button></td><td>description</td></tr>
The code in the stylesheet is as follows:
<CODE>
<xsl:template match="table-RdbDataOptions2" >
<!-- Add the data options and user info -->
<table width="100%" border="0" align="left">
<xsl:for-each select="td">
<tr>
<td colspan="2">
<xsl:choose>
<xsl:when test="position()=1">
<div align="left" class="subheading"><xsl:value-of select="." /></div>
</xsl:when>
<xsl:when test="position()=2">
<div align="left"><xsl:value-of select="." /></div>
</xsl:when>
</xsl:choose>
</td>
</tr>
</xsl:for-each>
<!-- now build a 2x row/2x cell table-->
<xsl:for-each select="rdb-DataOption">
<xsl:choose>
<xsl:when test="not(@recfav='')">
<xsl:choose>
<!-- when an uneven number, start a new table row. Add unevens to this row -->
<xsl:when test="position() mod 2=1">
<tr>
<xsl:choose>
<xsl:when test="@dataseriescheck=''">
<td> <input type="radio" name="rdbDataOptions" value="series" disabled="disabled"/></td>
<td><div align="left"><xsl:value-of select="." /></div></td>
</xsl:when>
<xsl:otherwise>
<td> <input type="radio" name="rdbDataOptions" value="series" disabled="disabled" checked="checked"/></td>
<td><div align="left"><xsl:value-of select="." /></div></td>
</xsl:otherwise>
<xsl:when test="@aggregatecheck=''">
<td> <input type="radio" name="rdbDataOptions" value="aggregate" disabled="disabled"/></td>
<td><div align="left"><xsl:value-of select="." /></div></td>
</xsl:when>
<xsl:otherwise>
<td><input type="radio" name="rdbDataOptions" value="series" disabled="disabled" checked="checked"/></td>
<td><div align="left"><xsl:value-of select="." /></div></td>
</xsl:otherwise>
</xsl:choose>
</tr>
</xsl:when><!-- end of test position() mod 2 = 1 -->
<xsl:otherwise><!-- Add new row for even numbers -->
<tr>
<xsl:choose>
<xsl:when test="@cummulativecheck=''">
<td> <input type="radio" name="rdbDataOption" value="cummulative" disabled="disabled"/></td>
<td><div align="left"><xsl:value-of select="." /></div></td>
</xsl:when>
<xsl:otherwise>
<td><input type="radio" name="rdbDataOption" value="cummulative" disabled="disabled" checked="checked"/></td>
<td><div align="left"><xsl:value-of select="." /></div></td>
</xsl:otherwise>
<xsl:when test="@averagecheck=''">
<td><input type="radio" name="rdbDataOption" value="Average" disabled="disabled"/></td>
<td><div align="left"><xsl:value-of select="." /></div></td>
</xsl:when>
<xsl:otherwise>
<td><input type="radio" name="rdbDataOption" value="Average" disabled="disabled" checked="checked"/></td>
<td><div align="left"><xsl:value-of select="." /></div></td>
</xsl:otherwise>
</xsl:choose>
</tr>
</xsl:otherwise><!-- end of adding new row for even numbers -->
</xsl:choose>
</xsl:when>
</xsl:choose><!-- end of check for not recents -->
<xsl:otherwise><!-- Recent -->
<xsl:choose>
<!-- when an uneven number, start a new table row. Add unevens to this row -->
<xsl:when test="position() mod 2=1">
<tr>
<xsl:choose>
<xsl:when test="@dataseriescheck=''">
<td><input type="radio" name="rdbDataOptions" value="series" disabled="disabled"/></td>
<td><div align="left"><xsl:value-of select="." /></div></td>
</xsl:when>
<xsl:otherwise>
<td> <input type="radio" name="rdbDataOptions" value="series" disabled="disabled" checked="checked"/></td>
<td><div align="left"><xsl:value-of select="." /></div></td>
</xsl:otherwise>
<xsl:when test="@aggregatecheck=''">
<td><input type="radio" name="rdbDataOptions" value="aggregate" disabled="disabled"/></td>
<td><div align="left"><xsl:value-of select="." /></div></td>
</xsl:when>
<xsl:otherwise>
<td><input type="radio" name="rdbDataOptions" value="series" disabled="disabled" checked="checked"/></td>
<td><div align="left"><xsl:value-of select="." /></div></td>
</xsl:otherwise>
</xsl:choose>
</tr>
</xsl:when><!-- end of test position() mod 2 = 1 -->
<xsl:otherwise><!-- Add new row for even numbers -->
<tr>
<xsl:choose>
<xsl:when test="@cummulativecheck=''">
<td><input type="radio" name="rdbDataOption" value="cummulative" disabled="disabled"/></td>
<td><div align="left"><xsl:value-of select="." /></div></td>
</xsl:when>
<xsl:otherwise>
<td> <input type="radio" name="rdbDataOption" value="cummulative" disabled="disabled" checked="checked"/></td>
<td><div align="left"><xsl:value-of select="." /></div></td>
</xsl:otherwise>
<xsl:when test="@averagecheck=''">
<td><input type="radio" name="rdbDataOption" value="Average" disabled="disabled"/></td>
<td><div align="left"><xsl:value-of select="." /></div></td>
</xsl:when>
<xsl:otherwise>
<td><input type="radio" name="rdbDataOption" value="Average" disabled="disabled" checked="checked"/></td>
<td><div align="left"><xsl:value-of select="." /></div></td>
</xsl:otherwise>
</xsl:choose>
</tr>
</xsl:otherwise><!-- end of adding new row for even numbers -->
</xsl:choose>
</xsl:otherwise>
</xsl:for-each>
</table>
</xsl:template>
</CODE>
The jsp creates the table in the following way:
<CODE>
<table-RdbDataOptions2>
<td><%=Lang.get("DataOptions", User.getPrimary(), User.getFallback())%></td>
<td><%=Lang.get("SelectDataOption", User.getPrimary(), User.getFallback())%></td>
<rdb-DataOption recfav="<%=strDisabled %>" dataseriescheck="<%=strDataOption[0] %>" ><%=Lang.get("ShowDataSeries", User.getPrimary(), User.getFallback())%></rdb-DataOption>
<rdb-DataOption recfav="<%=strDisabled %>" cumulativecheck="<%=strDataOption[1] %>" ><%=Lang.get("ShowCumulative", User.getPrimary(), User.getFallback())%></rdb-DataOption>
<rdb-DataOption recfav="<%=strDisabled %>" aggregatecheck="<%=strDataOption[2] %>" ><%=Lang.get("ShowAggregate", User.getPrimary(), User.getFallback())%></rdb-DataOption>
<rdb-DataOption recfav="<%=strDisabled %>" averagecheck="<%=strDataOption[3] %>" ><%=Lang.get("ShowDataSeriesAverage", User.getPrimary(), User.getFallback())%></rdb-DataOption>
</table-RdbDataOptions>
</CODE>
The following is the error I'm receiving:
javax.servlet.jsp.JspException: Error applying stylesheet..........
I can easily produce a table with like this:
|radio button description |
|radio button description |
|radio button description |
|radio button description |
|____________________|
but unfortunately that's not what's req'd!
Any help is disciplining the above stylesheet so that it does what its told would be greatly appreciated.
Yours, with respect!
Eddie.Well,
Funny how just looking at your own posting can highlight pretty obvious errors.
The reason for the stylesheet error msg was that the opening & closing table tags in the jsp didn't match!
However, I now get an almost empty table. I get the table headers - in other words, this part of the stylesheet is working properly:
<CODE>
<xsl:for-each select="td">
<tr>
<td colspan="2">
<xsl:choose>
<xsl:when test="position()=1">
<div align="left" class="subheading"><xsl:value-of select="." /></div>
</xsl:when>
<xsl:when test="position()=2">
<div align="left"><xsl:value-of select="." /></div>
</xsl:when>
</xsl:choose>
</td>
</tr>
</xsl:for-each>
</CODE>
But the rest is returning 'empty'. So, it nows seems that one or more of my tests is not working properly.
Onwards & upwards,
Eddie -
Data Matching For Non Alphabetical Letter (Japanese character)
Hi,
I want to do some data matching for Japanese Character like Name & Address (Using kanji or kana).
There's a lot of uniqueness of the japanese character like the letter is the same but the pronounciation can be different or it can be in reverse, the letter is different but the pronounciation is the same.
I don't know what is the best method that can support unicode letter (japanese) for matching.
Can anybody help me what is the best method for this case?
Can I use fuzzy logic things in SSIS?
Regards,
FelixHi Felix,
Fuzzy matching is based on a number of characters, not just one, it is for complete words.
So it will not match pronunciations, same is with the case when it is reverse, but it may may be matched if you come with an artificial match table.
So to make it out with SSIS you need to use a Lookup Transformation against this match table that defines what characters constitute a match.
Arthur My Blog
Maybe you are looking for
-
Hi, can someone please help me out since I have a deadline in coming up and need my laptop to work properly! I have windows 7 64bit running on a HP ProBook 6550b. My PC runs fine for about an hour, after an hour the screen freezes for 10 seconds and
-
O/P Type in case of return delivery
Hi, In our present system if in case there is some rejection of material we are rejecting the material and making return delivery with MBRL by entrering the GR number and Fusacal year and we are getting the print out but i want to know which o/p type
-
Problem to import IBM .XSD in SAP PI 7.11
I can't impot the follow .XSD in SAP PI, the system shows Name of element codigo-ISO-4217-Alfabetico contains errors: <?xml version="1.0" encoding="UTF-8"?> <xsd:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" tar
-
Nokia N8-00 'maximum number of connections in use'
Hi, I have creted another APN in the Destinations-Internet settings. Put this APN on priority 1. Then I se internet an it is ok. But when I open Nokia Maps or another App. Sometimes it tries to connect to the old APN then says 'maximum number of conn
-
Hello I have a new 2nd Gen Mini that I need a tip on how to do something. The AirPlay icon does not appear by default when I do the bottom swipe thing to get the control screen feature. But, I have somehow manage to get it to appear different times.