TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
j c
NA
45
0
generate dynamic string
Dec 13 2010 1:30 PM
I have a sp that generates a result looks like below
Userid orgid
1 100
1 200
1 400
2 100
I would like to generate a string something like below by looping thru the output result data table using ado.net
Userid 1 should generate
It needs to generate below statement surround by {} and separated by comma(,) if it has multiple orgids.. and orgid( after & ) need to be dynamically assigned in the string based on the table..
{[Org].[org ID].&[100], [Org].[org ID].&[200] ,[Org].[org ID].&[400] }
Userid =2
{[Org].[org ID].&[100] }
How can I dynamically generate this statement?
I can generate the stament if there is only one orgid for user but if you have multiple orgs .. not sure how Ic an concatenate multiple orgids by comma..
AllowedSet =
"{[org].[org ID].&["
+ orgID +
"]}"
;
I am using C#
Reply
Answers (
12
)
Change "Multiple Displays" combo box in "Screen Resolution" panel
How to do this project for ipad