[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

SAS Character function - Question

Posted on 2012-03-31
1
Medium Priority
?
443 Views
Last Modified: 2012-04-04
Hi all,

I have a question:

str1 = ('2011-01-02, 2011-01-03, 2011-01-04');


I wanted to convert the string to as below:

str2 = ('2011-01-02' , '2011-01-03' , '2011-01-04');


Can any please help!!

Thanks in advance.
0
Comment
Question by:aruku
[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
1 Comment
 
LVL 11

Accepted Solution

by:
theartfuldazzler earned 2000 total points
ID: 37792429
Hi

I'll test this on Monday when I have access to SAS again, but have you tried the TRANWRD function?

Str2 = TRANWRD(Str1, ","  , " ',' ");

This should replace all the commas with commas in single quotes. You need to copy the code above to see where I've used single and double quotes...
0

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
Suggested Courses

656 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