Solved

Reserved Blank Space in SQL delimited query

Posted on 2016-09-09
5
44 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 74

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 74

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 74

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

If you find yourself in this situation “I have used SELECT DISTINCT but I’m getting duplicates” then I'm sorry to say you are using the wrong SQL technique as it only does one thing which is: produces whole rows that are unique. If the results you a…
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…

726 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