Solved

Reserved Blank Space in SQL delimited query

Posted on 2016-09-09
5
31 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

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

Suggested Solutions

Title # Comments Views Activity
Access Query concatenation 12 48
SQL Query - Oracle 10g - Subract date from next data row 4 48
Query Records that don't match 8 32
Optimizing a query 3 33
As they say in love and is true in SQL: you can sum some Data some of the time, but you can't always aggregate all Data all the time! Introduction: By the end of this Article it is my intention to bring the meaning and value of the above quote to…
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
A short film showing how OnPage and Connectwise integration works.

919 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now