• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 63
  • Last Modified:

Reserved Blank Space in SQL delimited query

In my delimited query, I have certain fields that need to be reserved as a space.
Can I use '',1 to indicate a space of 1?

Or is there another way to correctly write it?
0
metalteck
Asked:
metalteck
  • 3
1 Solution
 
sdstuberCommented:
'' is a string of 0-length,
if you want a space then include a space character between the quotes ' '
0
 
sdstuberCommented:
or, depending on your database you could try something like chr(32)  to embed a space character
0
 
metalteckAuthor Commented:
Thanks for the assist.
I will have other questions regarding oracle delimited queries.
Would love your help.
0
 
Bill BachPresidentCommented:
Some databases also support SPACE(x) which will generate a string of x spaces, so SPACE(1) would also work.  However, if you simply need a single space, then ' ' is the easiest to type and understand.
0
 
sdstuberCommented:
If your questions are about Oracle, then I recommend adding the Oracle Topic Area to your future questions.

You'll get a little wider audience and, more importantly, give the participants some extra information about which suggestions to make since different databases have different SQL syntax functionality.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now