Solved

Reserved Blank Space in SQL delimited query

Posted on 2016-09-09
5
38 Views
Last Modified: 2016-09-09
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
Comment
Question by:metalteck
  • 3
5 Comments
 
LVL 73

Accepted Solution

by:
sdstuber earned 500 total points
ID: 41791904
'' is a string of 0-length,
if you want a space then include a space character between the quotes ' '
0
 
LVL 73

Expert Comment

by:sdstuber
ID: 41791908
or, depending on your database you could try something like chr(32)  to embed a space character
0
 

Author Closing Comment

by:metalteck
ID: 41791927
Thanks for the assist.
I will have other questions regarding oracle delimited queries.
Would love your help.
0
 
LVL 28

Expert Comment

by:Bill Bach
ID: 41791929
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
 
LVL 73

Expert Comment

by:sdstuber
ID: 41791966
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

'Between' is such a common word we rarely think about it but in SQL it has a very specific definition we should be aware of. While most database vendors will have their own unique phrases to describe it (see references at end) the concept in common …
I'm trying, I really am. But I've seen so many wrong approaches involving date(time) boundaries I despair about my inability to explain it. I've seen quite a few recently that define a non-leap year as 364 days, or 366 days and the list goes on. …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question