How to get required space between field names

Started by shreedharalmost 23 years ago4 messagesgeneral
Jump to latest
#1shreedhar
shreedhar@lucidindia.net

Hi All,

How to get required space between field names.

example.
field name is : contactid
But I would like to display it as 'Contact Id' in my report.

If I write query like in SQLServer 2000 I am getting an error.

* SELECT contactid AS [Contact Id] FROM tContacts;

How can I get similar to above operation.

Thanks & Regards,
Sreedhar Bhaskararaju

Our greatest happiness in life does not depend on the condition of life in which chance has placed us, but is always the result of good conscience, good health, occupation, and freedom in all just pursuits

#2alex b.
mailinglists1@gmx.de
In reply to: shreedhar (#1)
Re: How to get required space between field names

M$:
SELECT contactid AS [Contact Id] FROM tContacts;

PostGRE:
SELECT contactid AS "Contact Id" FROM tContacts;

shreedhar wrote:

Show quoted text

Hi All,

How to get required space between field names.

example.
field name is : contactid
But I would like to display it as 'Contact Id' in my report.

If I write query like in SQLServer 2000 I am getting an error.

* SELECT contactid AS [Contact Id] FROM tContacts;

How can I get similar to above operation.

Thanks & Regards,
Sreedhar Bhaskararaju

Our greatest happiness in life does not depend on the condition of life
in which chance has placed us, but is always the result of good
conscience, good health, occupation, and freedom in all just pursuits

#3Darko Prenosil
darko.prenosil@finteh.hr
In reply to: shreedhar (#1)
Re: How to get required space between field names

On Tuesday 20 May 2003 08:31, shreedhar wrote:

Hi All,

How to get required space between field names.

example.
field name is : contactid
But I would like to display it as 'Contact Id' in my report.

If I write query like in SQLServer 2000 I am getting an error.

* SELECT contactid AS [Contact Id] FROM tContacts;

How about:
SELECT contactid AS "Contact Id" FROM "tContacts";

Be very careful with mixing upper and lower cases in object names.
If Your table name is upper or mixed case You must quote it too, as shown
in example.

How can I get similar to above operation.

Thanks & Regards,
Sreedhar Bhaskararaju

Our greatest happiness in life does not depend on the condition of life in
which chance has placed us, but is always the result of good conscience,
good health, occupation, and freedom in all just pursuits

Regards !

#4Nigel J. Andrews
nandrews@investsystems.co.uk
In reply to: Darko Prenosil (#3)
Re: How to get required space between field names

On Tue, 20 May 2003, Darko Prenosil wrote:

SELECT contactid AS "Contact Id" FROM "tContacts";

Be very careful with mixing upper and lower cases in object names.
If Your table name is upper or mixed case You must quote it too, as shown
in example.

It's amazing how many of us failed to think about the table name in that
question.

--
Nigel Andrews