Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2005
»
SQL Server 2005 General Discussion
»
nvarchar -int
nvarchar -int
Rate Topic
Display Mode
Topic Options
Author
Message
avani104
avani104
Posted Friday, September 19, 2008 5:27 AM
Forum Newbie
Group: General Forum Members
Last Login: Friday, May 15, 2009 3:19 AM
Points: 7,
Visits: 50
In the query below:
FieldValueID-nvarchar(50) [since it can hv comma separated values 1,2]
ID - int
Select CountryName from MasterCountry where ID in (FieldValueID)
but this give an error...how do i read the values..pls lemme kno
Post #572415
ChrisM@Work
ChrisM@Work
Posted Friday, September 19, 2008 5:40 AM
SSCertifiable
Group: General Forum Members
Last Login: Today @ 5:03 AM
Points: 5,616,
Visits: 10,986
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
(Thanks Jeff)
You could CAST the [ID] as a varchar.
“Write the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.”
- Gail Shaw
For fast, accurate and documented assistance in answering your questions, please read
this article
.
Understanding and using APPLY, (I)
and
(II)
Paul White
Hidden RBAR: Triangular Joins
/
The "Numbers" or "Tally" Table: What it is and how it replaces a loop
Jeff Moden
Exploring Recursive CTEs by Example
Dwain Camps
Post #572422
Madhivanan-208264
Madhivanan-208264
Posted Friday, September 19, 2008 7:57 AM
Old Hand
Group: General Forum Members
Last Login: Wednesday, September 12, 2012 5:17 AM
Points: 329,
Visits: 461
avani104 (9/19/2008)
In the query below:
FieldValueID-nvarchar(50) [since it can hv comma separated values 1,2]
ID - int
Select CountryName from EYARDMasterCountry where ID in (FieldValueID)
but this give an error...how do i read the values..pls lemme kno
Search for Array+SQL Server in google
Madhivanan
Failing to plan is Planning to fail
Post #572537
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.