Can't query sql data
I'm connecting fine to a SQL DB. Used the "help" sample in LS 8.0 help to enter an ID that should query the data for a specific data set. Using "click" and "FormCalc", I get an error. This is my code:
//Change the commandType from TABLE to TEXT. TEXT
//is the equivalent of SQL Property
$sourceSet.DataConnection.#command.query.commandType = numeric
//Set the Select Node. Select in this case will be
//whatever SQL Property you want
$sourceSet.DataConnection.#command.query.select.nodes.item(0).value = Concat(Select*from licenses Where userid = , ListBox1.rawValue,)
//Reopen the Data connection
$sourceSet.DataConnection.open()
I've tried the Javascript version of this, and I get no error, but nothing at all happens.
Help??
- Help | About | Version:
Java(TM) Platform 1.6.0_14
Oracle IDE 3.1.07.42
Versioning Support 3.1.07.42
- Help | About | Properties:
java.home C:\Program Files\Java\jdk1.6.0_14\jre
jdbc.driver.home /C:/ORACLE/product/10.2.0/client_1/
jdbc.library /C:/ORACLE/product/10.2.0/client_1/jdbc/lib/ojdbc6.jar
- running <sqldevelope>\sqldeveloper\bin\sqldeveloper.exe:
popup blank console but no msg. in it.
Thanks for the tips! Yesterday I configured apache tomcat and copied ojdbc into it's
library, maybe copy wrong folder at that time. I just removed ojdbc6 and keep ojdbc14
in oracle jdbc library. After it, now the sql developer can start successfully!
Many thanks!
Similar Messages
-
Can't create sql data source in Power BI
Hello All,
I'm trying to use the sql database from my ACT! CRM to connect to Power BI.
I've succeeded in installing the Microsoft data management gateway and connecting this Power BI. Status is 'running'.
However when I try to add sql data source, and add credentials to log on the 'act7' instance of the sql, the response is 'failed to test connection, login failed'
Can anyone help?Hi Mark,
When you specify credential, are you able to connect to the data source directly? Meaning that if you're at home please ensure VPN is established between you and the data source. This is another factor of authentication when exposing data source for workbook
refresh.
Samuel -
Can't format SQL data as decimal
Hello All,
I'm having trouble getting my SQL data entered with a decimal
format. The SQL column I'm working with (Price) is configured as
Decimal (10,2). I can enter values directly in PHPMyadmin and it
works fine. I created the Insert Record and Update Record pages in
DW 8.0.2. Although either form would allow me to enter a decimal
value in the Price field when I viewed the records in the database
they had been stored as Intergers (nothing after the decimal
point). I went back to the Insert Record page and examined the
Insert Record Behaviour and in the dialog box for the Price field
was set to submit as Integer. So obviously this was wrong. However
there wasn't a 'decimal' or 'numeric' choice in the drop down menu
list. There was only 'text; integer; double; date; checkbox y,n;
checkbox 1,0; checkbox -1,0'. I selected double, but wasn't really
sure what it meant. But that seems to have allowed me to store the
value with decimal precision. But my guess is that this isn't the
correct setting. The situation is obviously the same on the Update
Record page. So that's really the basis of my question: shouldn't I
have other choices in that drop down menu.
Thanks,
Chrischriscatalano wrote:
> I'm having trouble getting my SQL data entered with a
decimal format. The SQL
> column I'm working with (Price) is configured as Decimal
(10,2).
> I selected double, but wasn't
> really sure what it meant. But that seems to have
allowed me to store the
> value with decimal precision. But my guess is that this
isn't the correct
> setting.
Your guess is wrong. Double means a number with a floating
decimal point.
David Powers
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "Foundation PHP 5 for Flash" (friends of ED)
http://foundationphp.com/ -
Can't Query Saptial Data again
Hi, I've smoothly created a R-Tree spatial index on a Index Organized Table(IOT) named ch100_polygon_iot( about 120 thousand rows ) containing only polygon geometries. But when I run the spatial query statements, I get the following error messages:
declare
i int;
j int;
RecNum int;
GIDNUM number;
NUM INT;
dis number(10,0);
time1 date;
time2 date;
DisStr varchar2(30);
GEOID VARCHAR2(40);
GEO mdsys.sdo_geometry;
begin
dis:=power(10,i);
DisStr:='distance = '|| to_char(dis);
time1:=sysdate;
NUM:=0;
for j in 0..10 loop
GIDNUM:=(j*12200);
SELECT GEOMETRY INTO GEO FROM scott.CH100_POLYGON_iot WHERE oID=GIDNUM;
SELECT count(*) INTO RecNum FROM scott.CH100_POLYGON_realiot A
WHERE SDO_RELATE(A.Geometry,GEO,'mask=ANYINTERACT querytype=WINDOW') = 'TRUE';
NUM:=NUM+RecNum;
end loop;
time2:=sysdate;
commit;
end;
ERROR at line 1:
ORA-01410: invalid Rowid
ORA-06512: at line 22
Can anyone please tell me what's wrong .Sorry - Oracle knew that. I had no idea.
Section 2.4.1 in the doc -
2.4.1 TABLE_NAME
The TABLE_NAME column contains the name of a feature table, such as COLA_MARKETS, that has a column of type SDO_GEOMETRY.
The table name is stored in the spatial metadata views in all uppercase characters.
The table name cannot contain spaces or mixed-case letters in a quoted string when inserted into the USER_SDO_GEOM_METADATA view, and it cannot be
in a quoted string when used in a query (unless it is in all uppercase characters).
The spatial feature table cannot be an index-organized table if you plan to create a spatial index on the spatial column. -
Hi, I've smoothly created a R-Tree spatial index on a Index Organized Table(IOT) named ch100_polygon_iot( about 120 thousand rows ) containing only polygon geometries. But when I run the spatial query statements, I get the following error messages:
declare
i int;
j int;
RecNum int;
GIDNUM number;
NUM INT;
dis number(10,0);
time1 date;
time2 date;
DisStr varchar2(30);
GEOID VARCHAR2(40);
GEO mdsys.sdo_geometry;
begin
dis:=power(10,i);
DisStr:='distance = '|| to_char(dis);
time1:=sysdate;
NUM:=0;
for j in 0..10 loop
GIDNUM:=(j*12200);
SELECT GEOMETRY INTO GEO FROM scott.CH100_POLYGON_iot WHERE oID=GIDNUM;
SELECT count(*) INTO RecNum FROM scott.CH100_POLYGON_realiot A
WHERE SDO_RELATE(A.Geometry,GEO,'mask=ANYINTERACT querytype=WINDOW') = 'TRUE';
NUM:=NUM+RecNum;
end loop;
time2:=sysdate;
/*insert into zyz.TEST_RESULT_TABLE (TEST_DESC,TIME_ELIPE,TEST_TIME)
values('查询TRY100_POLYGON_iot表中到CH100_POLYGON_SDO中gid=j*122(j从0到1000)的的polygon的距离为'||
DisStr||'的所有多边形.共查询到'||to_char(num)||' 个多变形.共消耗时间 ',
to_char((time2-time1)*24*3600)||' 秒',TO_CHAR(TIME2));--Seconds
commit;
end;
*************Long postings are being truncated to ~1 kB at this time.Sorry - Oracle knew that. I had no idea.
Section 2.4.1 in the doc -
2.4.1 TABLE_NAME
The TABLE_NAME column contains the name of a feature table, such as COLA_MARKETS, that has a column of type SDO_GEOMETRY.
The table name is stored in the spatial metadata views in all uppercase characters.
The table name cannot contain spaces or mixed-case letters in a quoted string when inserted into the USER_SDO_GEOM_METADATA view, and it cannot be
in a quoted string when used in a query (unless it is in all uppercase characters).
The spatial feature table cannot be an index-organized table if you plan to create a spatial index on the spatial column. -
Linked Server Problem while SQL Data Transfer using Non-sys Admin Account
Hi Team,
I've an issue while transferring the data from ServerA to ServerB. I've made the ServerB as "Linked Server" to Server A. Pre requisite like:
1) SQL Account is been created on ServerB.
2) Timeout settings for remote connections is set to "No Timeout".
When I execute the below script using Query Window, It executes successfully:
Insert into ServerB.DBName.dbo.TableName1
Select * from dbo.TableName1
But when I execute the same step by creating a SQL Job, it fails with the below error message:
Message
Executed as user: DomainName\UserName. Named Pipes Provider: Could not open a connection to SQL Server [1450]. [SQLSTATE 42000] (Error 1450) OLE DB provider "SQLNCLI" for linked server "ServerB" returned message "Login
timeout expired". [SQLSTATE 01000] (Error 7412) OLE DB provider "SQLNCLI" for linked server "ServerB" returned message "An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005,
this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.". [SQLSTATE 01000] (Error 7412). The step failed.
Could you please help me in fixing the above error message and I can transfer the SQL Data between 2 Servers.
Thank You
Sridhar D NaikSridhar,
Is this still an issue?
Thanks!
Ed Price, Azure & Power BI Customer Program Manager (Blog,
Small Basic,
Wiki Ninjas,
Wiki)
Answer an interesting question?
Create a wiki article about it! -
Do you guys know how can I query SQL database select records and input them to XSL file?
Let me know this is urgent.Is there an efficient way of doing this, rather than
hardcoding all the less than,greater than lines?Sounds like you need to read this:
http://java.sun.com/webservices/docs/1.1/tutorial/doc/index.html -
Help Required -- Can we use SQL Query to READ data from SAP MDM Tables
Hi All,
Please help.........
Can we use SQL Query to READ(No Creation/Updation/Deletion just Read) Data from SAP MDM tables directly, without using MDM Syndicator.
Or direct SQL access to SAP MDM tables is not possible. Only through MDM Syndicator can we export data.
Thanks in Advance
RegardsAll the tables you create in Repository comes under A2i_CM_Tables in Database named as your repository name. So the tables names are fields of table A2i_CM_Tables. Now i tried it but cant make it.
Now, I dont think its possible to extract all fields in tables and there values using select query. May be pure sql guy can do that or not.
But there is no relation of data extraction and syndicator. Data is viewed in Data Manager. and you can also store data in a file from DM also.
BR,
Alok -
I tried to make the question as explicit as possible.
Refer to Sql Server Management Studio's Results view. Depending upon the structure of the execution plan, the Results pane may begin displaying results while the query is still executing. Can someone point me in a direction for architecting a
data layer (I am tech and framework agnostic for this task. Any solution will suffice) that will begin receiving pages of the set before SQL Server has completed the entire query?
The call from the data layer to SQL Server will obviously have to be asynchronous, but is there any additional ceremony that I need to be aware of when issuing OPTION (FAST x) to the query optimizer?Thanks for the reply. (I actually meant to put this in the SQL Data Access forum, not the T-SQL forum)
"Generally the last step is ORDER BY in a
query, so nothing can start before that executes."
I would imagine you cannot ORDER BY and yield results as they are fetched because of the execution plan that would be generated. For the purposes of this post, please assume that sorting will be done purely client side
"Can you post your query?"
For purposes of discussion, let's assume that the query is
select *
from information_schema.columns
and also assume that you have "lots" of columns to display.
This was an exploratory question to see what would be necessary to replicate the behavior of Management Studio's Query Result view in a custom application.
I would imagine that there's going to be a lot of analysis of the execution plans that get generated in order for the OPTION (FAST x) optimizer hint to do any good, but apart from general tuning concerns that would allow SQL SERVER to yield a page of data
"fast", I was wondering if there was anything else required of the calling client to force it to yield return its first page.
After thinking about this (and phrasing it the way I did in the last sentence) perhaps this is the incorrect forum for this question. I imagine that my concerns are better addressed in forums dedicated to the technology of the calling client (which
would be a .NET assembly)
Be that as it may, if there is any ceremony that SQL Server imposes on clients in order to yield return, I would expect that my question would be in the scope of SQL Server discussions (even though I intended this to be in a different SQL Server forum) -
Can not query PQH_BUDGET_DETAILS in SQL*Plus
Hi!
I can see the Positions in the Forms-Mask within EBS.
I want to write a concurrent Programm which queries some data form the positions-table.
If i klick on "Help > Diagnostics > Examine" and select "system.last_query" i can see, that the data comes from a view called: "PQH_POS_BUDGETS_V".
But if i try to query this view in SQL*Plus, it is empty.
So i had a look at how this view is build, and i found, that the base tables should be PQH_BUDGETS and PQH_BUDGET_DETAILS.
How can i query the position_id in PQH_BUDGET_DETAILS in a concurrent program or an self-writen BI Publisher Report?
If i try to query in SQL*Plus it's empty.
Who can help me with this issue?
Thank you for your help!
Best regards,
ThomasHi!
Thats great!
Thank you very much!
Best regards,
Thomas -
After call commit sql , data can not flush to disk
I use berkey db which support sql . It's version is db-5.1.19.
1, Open a database.
2. Create a table.
3. exec "begin;" sql
4. exec sql which is insert record into table
5. exec "commit;" sql
6. copy database file (SourceDB_912_1.db and SourceDB_912_1.db-journal) to Local Disk of D, then use a tool of dbsql to open the database.
7. use select sql to check data, there is no record in table.
1
sqlite3 * m_pDB;
int nRet = sqlite3_open_v2(strDBName.c_str(), & m_pDB,SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE,NULL);
2
string strSQL="CREATE TABLE [TBLClientAccount] ( [ClientId] CHAR (36), [AccountId] CHAR (36) );";
char * errors;
nRet = sqlite3_exec(m_pDB, strSQL.c_str(), NULL, NULL, &errors);
3
nRet = sqlite3_exec(m_pDB, "begin;", NULL, NULL, &errors);
4
nRet = sqlite3_exec(m_pDB, "INSERT INTO TBLClientAccount (ClientId,AccountId) VALUES('dd','ddd'); ", NULL, NULL, &errors);
5
nRet = sqlite3_exec(m_pDB, "commit;", NULL, NULL, &errors);
Edited by: 887973 on Sep 27, 2011 11:15 PMHi,
Here is a simple test case program I used based on your description:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "sqlite3.h"
int error_handler(sqlite3*);
int main()
sqlite3 *m_pDB;
const char *strDBName = "C:/SRs/OTN Core 2290838 - after call commit sql , data can not flush to disk/SourceDB_912_1.db";
char * errors;
sqlite3_open_v2(strDBName, &m_pDB, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
error_handler(m_pDB);
sqlite3_exec(m_pDB, "CREATE TABLE [TBLClientAccount] ( [ClientId] CHAR (36), [AccountId] CHAR (36) );", NULL, NULL, &errors);
error_handler(m_pDB);
sqlite3_exec(m_pDB, "begin;", NULL, NULL, &errors);
error_handler(m_pDB);
sqlite3_exec(m_pDB, "INSERT INTO TBLClientAccount (ClientId,AccountId) VALUES('dd','ddd'); ", NULL, NULL, &errors);
error_handler(m_pDB);
sqlite3_exec(m_pDB, "commit;", NULL, NULL, &errors);
error_handler(m_pDB);
//sqlite3_close(m_pDB);
//error_handler(m_pDB);
int error_handler(sqlite3 *db)
int err_code = sqlite3_errcode(db);
switch(err_code) {
case SQLITE_OK:
case SQLITE_DONE:
case SQLITE_ROW:
break;
default:
fprintf(stderr, "ERROR: %s. ERRCODE: %d.\n", sqlite3_errmsg(db), err_code);
exit(err_code);
return err_code;
}Than I copied the SourceDB_912_1.db database and the SourceDB_912_1.db-journal directory containing the environment files (region files, log files) to D:\, opened the database using the "dbsql" command line tool, and queried the table; the data is there:
D:\bdbsql-dir>ls -al
-rw-rw-rw- 1 acostach 0 32768 2011-10-12 12:51 SourceDB_912_1.db
drw-rw-rw- 2 acostach 0 0 2011-10-12 12:51 SourceDB_912_1.db-journal
D:\bdbsql-dir>C:\BerkeleyDB\db-5.1.19\build_windows\Win32\Debug\dbsql SourceDB_912_1.db
Berkeley DB 11g Release 2, library version 11.2.5.1.19: (August 27, 2010)
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
dbsql> .tables
TBLClientAccount
dbsql> .schema TBLClientAccount
CREATE TABLE [TBLClientAccount] ( [ClientId] CHAR (36), [AccountId] CHAR (36) );
dbsql> select * from TBLClientAccount;
dd|dddI do not see where the issue is. The data can be successfully retrieved, it is present in the database.
Could you try putting in the sqlite3_close() call and see if you still get the error?
Did you remove the __db.* files from the SourceDB_912_1.db-journal directory?
Did you use PRAGMA synchronous, and if so, what is the value you set?
If this is still an issue for you, please describe in more detail the exact steps needed to get this reproduced and provide a simple stand-alone test case program that reproduces it.
Regards,
Andrei -
Oracle Forms - How can I create a Data Block with query
Dear friends I have a question, I couldn't do this..
I have a sql query, I want to show the datas of the query.. How can I do this. ?
Data Block Wizard wants a table, view or stored procedure, but I have a query, how can I create a data block with my query.. I m waiting your helps..? Please...
SemihHi,
You have two options
1. create a view and base the block on the view
2. create a block with a query Data Source Type of 'FROM clause query'
Hope this helps
Neil -
How can I query data from XML file stored as a CLOB ?
Hi folks,
please see below sample of XML file, which is stored in "os_import_docs", column "document" as CLOB.
I would like to query this XML file using some SQL select.
How can I query data form below XML?
<?xml version="1.0" encoding="UTF-8"?>
<etd>
<header>
<AR>000000000</AR>
<AW>0</AW>
<CT>S</CT>
<CU>H</CU>
<CZ>SS48</CZ>
<BU>4</BU>
<CH>0032</CH>
<CK>2012-11-01</CK>
<CL>21:18</CL>
<CW>225</CW>
<CX>0</CX>
<CF>SS-CZL18</CF>
<DV>2</DV>
</header>
<account_group id="234">
<account id="234">
<invoice id="000742024">
<da>
<AR>000742024</AR>
<AW>0</AW>
<CT>D</CT>
<CU>A</CU>
<CH>0032</CH>
<BY>31-10-2012</BY>
<CA>25-10-2012</CA>
<AB>234</AB>
<AA>234</AA>
<BS>88754515</BS>
<AD>Mike Tyson</AD>
<AC>Mike Tyson</AC>
<AZ>CZ6521232465</AZ>
<AE/>
<CG>A</CG>
<AL>A</AL>
<BZ>.</BZ>
<AH>Some street</AH>
<AI/>
<AF>Some city</AF>
<AK>Kraj</AK>
<AG>CZ</AG>
<AJ>885 21</AJ>
<CR>21-11-2012</CR>
<AY>602718709</AY>
<AV>800184965</AV>
<AP/>
<AO/>
<AQ/>
<AN/>
</da>
<da>
<AR>000742024</AR>
<AW>0</AW>
<CT>D</CT>
<CU>A</CU>
<CH>0032</CH>
<BY>31-10-2012</BY>
<CA>25-10-2012</CA>
<AB>234</AB>
<AA>234</AA>
<BS>88754515</BS>
<AD>Mike Tyson</AD>
<AC>Mike Tyson</AC>
<AZ>CZ6521232465</AZ>
<AE/>
<CG>A</CG>
<AL>L</AL>
<BZ>Mike Tyson</BZ>
<AH>Some street</AH>
<AI/>
<AF>Some city</AF>
<AK>Kraj</AK>
<AG>CZ</AG>
<AJ>885 21</AJ>
<CR>21-11-2012</CR>
<AY/>
<AV>800184965</AV>
<AP/>
<AO/>
<AQ/>
<AN/>
</da>
<detaildc CH="0032" AB="234" BS="11888954" BB="32" BA="CZ" AT="" CI="7077329000002340342" AU="" DU="1Z48395" CB="CZK">
<dc>
<AW>0</AW>
<CT>D</CT>
<CU>C</CU>
<BY>31-10-2012</BY>
<CA>25-10-2012</CA>
<CV>8151</CV>
<BT>12111</BT>
<CJ>1</CJ>
<AM>0</AM>
<DR>PC</DR>
<DS/>
<DO>25-10-2012</DO>
<DQ>18:42</DQ>
<CE>1</CE>
<BH>8151</BH>
<CY>8151 SHELL MALKOVICE P</CY>
<DP>049336</DP>
<DT/>
<BQ/>
<BR>500000</BR>
<CN>30</CN>
<CM>030</CM>
<BO>160,00</BO>
<BF>38,900</BF>
<BC>6224,00</BC>
<BI>32,417</BI>
<CD>B</CD>
<BG>0,600</BG>
<BK>31,817</BK>
<BJ>0,000</BJ>
<DI>8</DI>
<BP>20,00%</BP>
<CC>CZK</CC>
<BM>5090,67</BM>
<BN>1018,13</BN>
<BL>6108,80</BL>
<BD>5090,67</BD>
<BE>1018,13</BE>
<DW>6108,80</DW>
<CO>Nafta</CO>
</dc>
</detaildc>
<dt>
<AR>000742024</AR>
<AW>0</AW>
<CT>D</CT>
<CU>T</CU>
<CH>0032</CH>
<BY>31-10-2012</BY>
<CA>25-10-2012</CA>
<AB>234</AB>
<AA>234</AA>
<BS>11888954</BS>
<BB/>
<BA>CZ</BA>
<DG>1</DG>
<CN>30</CN>
<CM>030</CM>
<DF>160,00</DF>
<DH>litr</DH>
<DJ>20,00%</DJ>
<DD>5090,67</DD>
<DE>1018,13</DE>
<DC>6108,80</DC>
<DB>CZK</DB>
<DA>P</DA>
<AX/>
<CQ/>
<CP/>
</dt>
<dt>
<AR>000742024</AR>
<AW>0</AW>
<CT>D</CT>
<CU>T</CU>
<CH>0032</CH>
<BY>31-10-2012</BY>
<CA>25-10-2012</CA>
<AB>234</AB>
<AA>234</AA>
<BS>11888954</BS>
<BB/>
<BA>CZ</BA>
<DG>2</DG>
<CN/>
<CM/>
<DF>160,00</DF>
<DH>litr</DH>
<DJ/>
<DD>5090,67</DD>
<DE>1018,13</DE>
<DC>6108,80</DC>
<DB>CZK</DB>
<DA/>
<AX/>
<CQ/>
<CP/>
</dt>
<dt>
<AR>000742024</AR>
<AW>0</AW>
<CT>D</CT>
<CU>T</CU>
<CH>0032</CH>
<BY>31-10-2012</BY>
<CA>25-10-2012</CA>
<AB>234</AB>
<AA>234</AA>
<BS>11888954</BS>
<BB/>
<BA>CZ</BA>
<DG>19</DG>
<CN/>
<CM/>
<DF/>
<DH/>
<DJ/>
<DD>5090,67</DD>
<DE>1018,13</DE>
<DC>6108,80</DC>
<DB>CZK</DB>
<DA/>
<AX/>
<CQ/>
<CP/>
</dt>
<dt>
<AR>000742024</AR>
<AW>0</AW>
<CT>D</CT>
<CU>T</CU>
<CH>0032</CH>
<BY>31-10-2012</BY>
<CA>25-10-2012</CA>
<AB>234</AB>
<AA>234</AA>
<BS>11888954</BS>
<BB/>
<BA>CZ</BA>
<DG>8</DG>
<CN/>
<CM/>
<DF/>
<DH/>
<DJ/>
<DD>5090,67</DD>
<DE>1018,13</DE>
<DC>6108,80</DC>
<DB>CZK</DB>
<DA/>
<AX/>
<CQ/>
<CP/>
</dt>
</invoice>
</account>
</account_group>
<footer>
<AR>999999999</AR>
<AW>0</AW>
<CT>S</CT>
<CU>T</CU>
<CZ>SS48</CZ>
<BU>4</BU>
<CH>0032</CH>
<CK>2012-11-01</CK>
<CL>23:04</CL>
<CW>225</CW>
<BX>1</BX>
<CS>7</CS>
<BW>0000000000000610880</BW>
</footer>
</etd>sample - not working:
select x.*
from os_import_docs d
,XMLTABLE('/etd/header'
PASSING httpuritype(d.document).getXML()
COLUMNS
response_status varchar2(50) PATH 'AR'
) x
where d.object_id = 2587058
and rownum = 1;
ORA-22835: Buffer too small for CLOB to CHAR or BLOB to RAW conversion (actual: 6196, maximum: 4000)Many thanks,
TomasHello,
many thanks for the reply. Your examples are very usefull for me.
To answer your questions.
An XML structure:
/etd
/header - repeat in each row in output
/account_group/account
/invoice
/da - repeat for each details under "selected "invoice
/detaildc/dc - the lowest level
/detaildn/dn - the lowest level
/dt - repeat for each details under "selected "invoice
/footer - repeat in each row in outputI would like to to have a 1 row for each "record" in /detaildc section and include related nodes at higher levels.
Please see below XML file, which is simplified file of example in first post, but includes a complete xml structure which needs to be queried in db.
<?xml version="1.0" encoding="UTF-8"?>
<etd>
<header>
<AR>000000000</AR>
<CK>2012-10-31</CK>
<CF>SS-CZL19</CF>
</header>
<account_group id="234">
<account id="234">
<invoice id="EI08P4000">
<da>
<AR>EI08P4000</AR>
<AD>Mickey Mouse</AD>
</da>
<detaildc DU="1Z56655" CB="EUR">
<dc>
<DO>16-10-2012</DO>
<CY>ASFINAG POST_MAUT</CY>
<BM>1940,60</BM>
<CO>Dalnicni znamka</CO>
</dc>
</detaildc>
<detaildc DU="2Z55050" CB="EUR">
<dc>
<DO>17-10-2012</DO>
<CY>ASFINAG POST_MAUT</CY>
<BM>1328,10</BM>
<CO>Dalnicni znamka</CO>
</dc>
</detaildc>
<detaildc DU="2Z90001" CB="EUR">
<dc>
<DO>27-10-2012</DO>
<CY>ASFINAG POST_MAUT</CY>
<BM>185,10</BM>
<CO>Poplatek</CO>
</dc>
</detaildc>
<dt>
<AR>EI08P4000</AR>
<DG>8</DG>
</dt>
</invoice>
</account>
<account id="234">
<invoice id="EI13T7777">
<da>
<AR>EI13T7777</AR>
<AD>Mickey Mouse</AD>
</da>
<detaildc DU="1Z48302" CB="EUR">
<dc>
<DO>26-10-2012</DO>
<CY>SANEF 07706 A 07704</CY>
<BM>232,10</BM>
<CO>Dalnicni poplatek</CO>
</dc>
</detaildc>
<detaildc DU="1Z48302" CB="EUR">
<dc>
<DO>20-10-2012</DO>
<CY>TEST A 07704</CY>
<BM>30,10</BM>
<CO>Poplatek</CO>
</dc>
</detaildc>
<dt>
<AR>EI13T7777</AR>
<DG>8</DG>
</dt>
</invoice>
</account>
<account id="234">
<invoice id="EI327744">
<da>
<AR>EI327744</AR>
<AD>Mickey Mouse</AD>
</da>
<detaildn CI="707732 00000234" >
<dn>
<BY>30-10-2012</BY>
<BM>8,10</BM>
</dn>
</detaildn>
<detaildn CI="707732 00000234" >
<dn>
<BY>30-10-2012</BY>
<BM>399,50</BM>
</dn>
</detaildn>
<dt>
<AR>EI327744</AR>
</dt>
</invoice>
</account>
<account id="234">
<invoice id="EI349515">
<da>
<AR>EI349515</AR>
<AD>Mickey Mouse</AD>
</da>
<detaildc DU="1Z56514" CB="EUR">
<dc>
<DO>29-10-2012</DO>
<CY>ALLAMI AUTOPALYAKEZE</CY>
<BM>1240,60</BM>
<CO>Dalnicni znamka</CO>
</dc>
</detaildc>
<detaildc DU="1Z56515" CB="EUR">
<dc>
<DO>19-10-2012</DO>
<CY>ASFINAG POST_MAUT</CY>
<BM>7428,10</BM>
<CO>Dalnicni znamka</CO>
</dc>
</detaildc>
<detaildc DU="1Z56515" CB="EUR">
<dc>
<DO>12-10-2012</DO>
<CY>UK</CY>
<BM>954,10</BM>
<CO>Poplatek</CO>
</dc>
</detaildc>
<dt>
<AR>EI349515</AR>
<DG>8</DG>
</dt>
</invoice>
</account>
</account_group>
<footer>
<CZ>SS47</CZ>
<BU>4</BU>
<CH>0032</CH>
<CK>2012-10-31</CK>
<CL>01:25</CL>
</footer>
</etd>Expected output
AR CK CF AR4 AD DU CB DO CY BM CO AR5 DG CI BY BM6 CZ BU CH CK7 CL
0 41213 SS-CZL19 EI08P4000 Mickey Mouse 1Z56655 EUR 16-10-2012 ASFINAG POST_MAUT 1940,60 Dalnicni znamka EI08P4000 8 SS47 4 32 41213 01:25
0 41213 SS-CZL19 EI08P4000 Mickey Mouse 2Z55050 EUR 17-10-2012 ASFINAG POST_MAUT 1328,10 Dalnicni znamka EI08P4000 8 SS47 4 32 41213 01:25
0 41213 SS-CZL19 EI08P4000 Mickey Mouse 2Z90001 EUR 27-10-2012 ASFINAG POST_MAUT 185,10 Poplatek EI08P4000 8 SS47 4 32 41213 01:25
0 41213 SS-CZL19 EI13T7777 Mickey Mouse 1Z48302 EUR 26-10-2012 SANEF 07706 A 07704 232,10 Dalnicni poplatek EI13T7777 8 SS47 4 32 41213 01:25
0 41213 SS-CZL19 EI13T7777 Mickey Mouse 1Z48302 EUR 20-10-2012 TEST A 07704 30,10 Poplatek EI13T7777 8 SS47 4 32 41213 01:25
0 41213 SS-CZL19 EI327744 Mickey Mouse EI327744 707732 00000234 30-10-2012 8,10 SS47 4 32 41213 01:25
0 41213 SS-CZL19 EI327744 Mickey Mouse EI327744 707732 00000234 30-10-2012 399,50 SS47 4 32 41213 01:25
0 41213 SS-CZL19 EI349515 Mickey Mouse 1Z56514 EUR 29-10-2012 ALLAMI AUTOPALYAKEZE 1240,60 Dalnicni znamka EI349515 8 SS47 4 32 41213 01:25
0 41213 SS-CZL19 EI349515 Mickey Mouse 1Z56515 EUR 19-10-2012 ASFINAG POST_MAUT 7428,10 Dalnicni znamka EI349515 8 SS47 4 32 41213 01:25
0 41213 SS-CZL19 EI349515 Mickey Mouse 1Z56515 EUR 12-10-2012 UK 954,10 Poplatek EI349515 8 SS47 4 32 41213 01:25 -
Can I use a OID rule for a Query SQL Lov of BIP?
Hi. Can I use OID data (rules) for a query sql lov in BIP? Ex. filters users/store.
Thank you.
R.Hi,
I didn't look at the example, but if you want to secure your application then you should use container managed security. Read this .
Anyway, you could add this before return "good"; in your login_action()
FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put("username", user);Then, you can access this from anywhere in the application by using #{sessionScope.username}.
Pedja -
How can I get a date without the hour from sql server 2000 ?
hellou!
I have a JTable, and one of it's columns has to show a date. This date i have to show is specified as datetime on the Sql Server 2000 database where I have to take the data.
the query of the dataset attached to the JTable is something like "select * from Table".
The problem is that the JTable column that displays the date shows the date and the hour, for example:
7/10/04 0:00:00
and I need to show the date without the hour, only the 7/10/04. Can anyone tell me how to do that?
thank you very much! : )The easiest way to format a date is with java.text.SimpleDateFormat. When creating it you pass a format string which can be used to parse or format date objects.
SimpleDateFormat formater = new SimpleDateFormat( "MM/dd/yyyy" );
// Get date objects directly from sql
Date foundDate = result.getDate( 1 ); //where result is the ResultSet and 1 is the date column
String formatedDate = formater.format( foundDate );Now the JTable's table model can be adjusted to store a formated String instead of a Date. If for some reason it is required to store the value as a Date overload the table model to return the formated string when getValueAt is called.
Maybe you are looking for
-
How to change display name of the attachment item attribute.
Hello Experts I have a requirement to send a notification with attachment but attachment name should be attachment name, Is there any way to change the display name of the Attachment Please advise; Thanks Rajesh.
-
Can't login after deleting a standard user on directory utility.
My laptop was rebooted in an apple service center, they made a user account for me to use. I backed up my old user with migration using time machine. I changed the administrator to my old user account and tried to delete the other user but it kept on
-
Share external drive with network PCs?
Hi all- Figured I'd ask here as there are probably more people with an interest in sharing external drives... Anyway: I'm on a network, but need to set up a dedicated hard drive to share with 1 other person with a PC. The drive will hold all kinds of
-
Crazy lag / slow / when doing anything with text
CS6 on PC with 16 gig new ram and i7 and inDesign and Illustrator are both giving me lags. Especially on ID, when I try and use the type tool to select text it takes four to fifteen seconds for the top toolbar to turn over to text! WT*?
-
Will new iMac beat old Powermac???
I've had my powermac dual G5 1.8 since 2004 and am thinking of uprading to a new high-end intel-iMac with leopard. My main reasons are that my Mac has become really sluggish of late especially with multiple application open and viewing video. I mostl