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
Sandeep Yadav
NA
68
663
Replacement of nvarchar column value to int
Nov 17 2018 3:52 AM
Hi
I have a table that stores personal informations. Personal infos have a field of vehicle type in which user can select multiple vehicles from multiselect dropdown list.
So I have to store selected dropdown item(Multiple ids) in a single column of table(Column Name say RelatedVehicles and the values stored the column in my case is 1,29 in nvarchar(200) type column).
Now I have to fetch this value(1,29) which nvarchar type to 'In' clause of another query like below:
select * from VehicleMaster where vId in (Select RelatedVehicles from UserMaster where UID=1).
Here vId in of Integer type and subquery returns nvarchar type value i.e ('1,29') .
Please suggest...
I have tried replacing the (,) to ',' so it becomes '1','29' now then it is not accepting it.
Reply
Answers (
6
)
convert rows into column in sql server
Convert of NVARCHAR and DATETIME