cancel
Showing results for 
Search instead for 
Did you mean: 

XML SQL column names with spaces

Former Member
0 Kudos

Hello everyone,

I am implementing an XML to JDBC (MS SQL) scenario, using XML SQL format.

The problem is that both the Table names we need to use and the column names have spaces.

I was able to bypass the problem with the Table name by using the table element and inserting the name included in brackets [ ].

I cannot do the same for the column names, since they must be the element names in the Data type and it results to an error.

Is there any way to define the column names dynamically, or other way to bypass the problem ?

To give an example:

A working XML SQL query looks like this

- <StatementName1>

- <Dbtab action="SELECT">

<table>[Table Name With spaces]</table>

- <access>

<Date />

</access>

- <key1>

<Date>2009-05-04</Date>

</key1>

</Dbtab>

</StatementName1>

But in the above example, I was only able to use column "Date", beccause it has no spaces

If there was a column called "Posting Date", how could I use it in the above query ?

Thanks,

Panayotis

Edited by: Panayotis Papadopoulos on Jul 6, 2010 3:23 PM

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

You could use a stored procedure for this.

The input parameters of the stored procedures do not use blanks.

Former Member
0 Kudos

Thanks,

but I would prefer the handling to be in the R/3 / PI side, as much as possible

stefan_grube
Active Contributor
0 Kudos
but I would prefer the handling to be in the R/3 / PI side, as much as possible

Maybe an XSLT/Java mapping could help to change the tag names?

But I did not try this so far.

btw: I have never heard of database tables with spaces in names.

Not everything which is possible needs to be done

Answers (0)