Showing posts with label formatted. Show all posts
Showing posts with label formatted. Show all posts

Friday, March 9, 2012

Possible to have a sql query like this...

Say i have a string formatted as...

s = 32,45,2,13,4

in my SQL stored procedure... i want to do something like...

SELECT * FROM t1 WHERE t1.a IN s

I know that will not work with the comma character seperating each value...but is there a way to do it so that it work? i dont think there is...but i just want to make sure.This would work:


CREATE PROCEDURE GetProductsByID
(
@.s varchar(255)
)

AS

DECLARE @.SELECT varchar(500)
SET @.SELECT = 'SELECT * FROM Products WHERE Products.ProductID IN (' + @.s + ')'

EXEC(@.SELECT)

|||do you know why it has to be done this way? would it have worked if a delimiter was | rather than ,?

and say we have 33,23,45,65

will that also return rows wid ID's of 3, b/c of 33?

Wednesday, March 7, 2012

Possible to display RTF from db? Is there a control?

I'd like to save RTF (or html, possibly) in a memo field of a table then display that as formatted text on a report. Can this be done? I've used a control (RTFedit) in Access to do this, though the results were mixed. I need to display tables with formatting.

Thanks in advance

Hello,

There is currently no way to do this with Reporting Services. We are considering adding a rich-text report control in a future version.

Thanks,
Chris

|||

Ok, so this is a really late reply, but in the event you still need it, or someone else out there is having the same problem, refer to my walkthrough in this thread http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=738557&SiteID=1

Possible to display RTF from db? Is there a control?

I'd like to save RTF (or html, possibly) in a memo field of a table then display that as formatted text on a report. Can this be done? I've used a control (RTFedit) in Access to do this, though the results were mixed. I need to display tables with formatting.

Thanks in advance

Hello,

There is currently no way to do this with Reporting Services. We are considering adding a rich-text report control in a future version.

Thanks,
Chris

|||

Ok, so this is a really late reply, but in the event you still need it, or someone else out there is having the same problem, refer to my walkthrough in this thread http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=738557&SiteID=1