Solved

Reserved Blank Space in SQL delimited query

Posted on 2016-09-09
5
22 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
Comment Utility
'' 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
Comment Utility
or, depending on your database you could try something like chr(32)  to embed a space character
0
 

Author Closing Comment

by:metalteck
Comment Utility
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
Comment Utility
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
Comment Utility
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

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…
Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

771 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

10 Experts available now in Live!

Get 1:1 Help Now