cancel
Showing results for 
Search instead for 
Did you mean: 

Square Brackets

Former Member
0 Kudos

Hi,

I'm completely homegrown, so excuse me if this is novice stuff...

In a command statement, what do square brackets [   ] represent?

e.g.

select a.[Start Date], a.[Customer Type] from SYSADM.Customers  a

I've never run into this before.

Thanks,

Matt

Accepted Solutions (1)

Accepted Solutions (1)

former_member203168
Active Participant
0 Kudos

Hi Matt,

When you check the Show SQL Query in Crystal Designer, it shows the Query dialog box displays the SQL query that Crystal is sending to Database Server.

Query names, Table names, Field names and Parameters which are coming from database those will shows in Square brackets([]) in Show SQL Query dialog box.

Answers (2)

Answers (2)

Former Member
0 Kudos

Thank you, All,

Funny, I've never run into this usage, but I suppose it's because I still have a habit of avoiding non alpha-numerics when I build and code.  Seems to me I've used quotes somewhere along the line, but maybe not.

Thank you

JWiseman
Active Contributor
0 Kudos

hey Matt,

the square brackets as far as i know are used to avoid conflicts between column names and reserved words in your database's sql syntax or when you may have special characters in column names etc.   in the e.g. that you gave it would negate errors from the spaces in the column names.

jamie