Showing posts with label spacing. Show all posts
Showing posts with label spacing. Show all posts

Wednesday, March 7, 2012

Column spacing issue

Hi,

I'm developing a report at the moment that uses a sub report twice on the same report (legal legislation type of thing, requires information to be displayed twice.). In the first location the one column is heavily spaced to the right (though not designed this way), causing a new blank page to be created when exporting, but at the other location (on the same report, same data), the spacing is normal. What could be causing this?

Thanks,

It seems the only way to fix this is to delete the specific table, and then to re-create it.

Strange. This occurred now in VS 2003.

Saturday, February 25, 2012

Column naming/spacing

Is it possible to have spacing within a column name? Something like
"column name." I can do it from EM but won't let me do it in query
analyzer. Can someone tell me the command to do this in query
analyzer? Thanks!There are two ways to handle special characters (or reserved keywords) in
identifiers (databases, tables, other object names, etc.):

- using brackets [], like this (the example below includes some other
objects like database and table names with special characters):

SELECT [My Column] FROM [My~Database].[My^User^ID].[My$Table]

- using double quotation marks (this is the SQL-92 syntax), like this:

SELECT "My Column" FROM "My~Database"."My^User^ID"."My$Table"

In order to use the double quotation marks the QUOTED_IDENTIFIER option has
to be ON. You can do that in Query Analyzer by running:

SET QUOTED_IDENTIFIER ON

It is not a good practice to use special characters in identifiers as it
makes code difficult to read and maintain.

HTH,

Plamen Ratchev
http://www.SQLStudio.com