Solved

Appending singe quotes both sides to a varchar data type

Posted on 2008-10-03
3
331 Views
Last Modified: 2008-11-07
i have varchar datatype variable
lets say  abc
how to convert  abc as 'abc' with some operations(arithmatic or any)
0
Comment
Question by:pavanark
3 Comments
 
LVL 4

Accepted Solution

by:
GO-87 earned 500 total points
ID: 22632837
Would this work?
SELECT '''' & fieldname & ''''
FROM tablename
or alternatively
SELECT CONCAT('''',fieldname,'''')
  FROM tablename  
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Loading csv or delimited data files to MySQL database is a very common task frequently questioned about and almost every time LOAD DATA INFILE comes to the rescue. Here we will try to understand some of the very common scenarios for loading data …
Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
This video discusses moving either the default database or any database to a new volume.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

757 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

22 Experts available now in Live!

Get 1:1 Help Now