Solved

Appending singe quotes both sides to a varchar data type

Posted on 2008-10-03
3
362 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
join tables 4 56
Insert values are dynamic 11 51
reverse engineer .sql from php files 11 34
How to extract database info from current month and year 7 11
Fore-Foreword Today (2016) Maxmind has a new approach to the distribution of its data sets.  This article may be obsolete.  Instead of using the examples here, have a look at the MaxMind API (https://www.maxmind.com/en/geolite2-developer-package). …
All XML, All the Time; More Fun MySQL Tidbits – Dynamically Generate XML via Stored Procedure in MySQL Extensible Markup Language (XML) and database systems, a marriage we are seeing more and more of.  So the topics of parsing and manipulating XM…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

860 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