How to write sql statements with tables using reserved words

0

Hello,

I am trying to get started using iReport Designer and hopefully someone can help me out with this question. Our database is Microsoft Dynamics NAV and all the tables have special chars in them, such as this:

Company Name$Table Name

In SQL my query is SELECT * FROM [Company Name$Table Name]

However when I do this in iReport query it removes the brackets. How can I write queries with these special chars?

blackc2004's picture
Joined: Jun 21 2013 - 2:46pm
Last seen: 6 years 4 months ago

1 Answer:

0

I don´t know exactly how to do with MS Dyn... but the different databases use diferent text enclosuring.

I think you could try to use the query designer in iReport to createa simple sql, then look how the tablenames are enclosed (i would assume " or ')

Cheers, Thomas

http://www.thomaszimmer.net

Thomas Zimmer's picture
Joined: Oct 2 2012 - 1:35am
Last seen: 5 days 12 hours ago

Hi there, we're using MSSQL as our database. The table names are enclosed in [. But the iReport seems to remove them when wringing the query.

blackc2004 - 6 years 4 months ago

Did you try to create a simple query with the query designer in iReport?

Thomas Zimmer - 6 years 4 months ago
Feedback
randomness