February 24, 2015 at 9:12 am
Hi Friends,
I want to concatenate image column with varchar column in stuff function. is it possible?
Thanks,
Abhas.
February 24, 2015 at 9:20 am
is the image datatype actually a text file or something stuffed into the column? what is in the image column? a real image? html rtf or something?
if the base type is not text of some kind, you simply cannot do what you are asking.
you'd convert to varbinary, then varchar(max), then fiddle with the text.
select convert(varchar(max),Convert(varbinary(max),MyImageColumn)) From SomeTable
Lowell
February 24, 2015 at 9:33 am
Thannks Lowell
Actually i want to display as test + Checkbox+ test1 +checkbox +test2.
here i have stored checkbox as image in the database. I am displaying as test , test1, test2 but i want to display checkbox instead of comma(,). Is it possible?
Thanks
Abhas.
February 24, 2015 at 9:40 am
well, this has more to do with the display medium more than anything. if you mean checkbox is actually code like this:
<img src="Mywebsite.checkbox.gif">
or
<input type="checkbox" >
or your image is actually a binary value like 0x0000A38C00BEB787....
are you constructing HTML that will then be rendered?
Lowell
February 24, 2015 at 9:43 am
yes, Iamge is binary value like 0x0000A38C00BEB787....
Thanks,
Abhas
February 24, 2015 at 9:51 am
abhas (2/24/2015)
yes, Iamge is binary value like 0x0000A38C00BEB787....Thanks,
Abhas
then no, you cannot do what you are asking.
you cannot concatenate an image to text.
you might be able to display text and image side by side in html, but that's adifferent animal.
Lowell
February 24, 2015 at 9:54 am
Thanx Lowell,
By the way any other option to do this? i need to display output as test1(checkbox)test2(checkbox). Client want just output,i can use any other methos as well.
Thanks
Abhas.
February 24, 2015 at 10:11 am
abhas (2/24/2015)
Thanx Lowell,By the way any other option to do this? i need to display output as test1(checkbox)test2(checkbox). Client want just output,i can use any other methos as well.
Thanks
Abhas.
it 100% depends on what medium this is displayed in: pdf, word, html , wpf, windows forms,etc.
without knowing that, it's all guess work.
Lowell
February 24, 2015 at 10:19 am
Hi Lowell,
I will use this in crystal report which will display in pdf format.
Thanks
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply