I have a table with large number of rows. I want to select all values of one particular column and create separate column for each unique value.
For example :
into something like this :
SELECT
left_side = RTRIM(SUBSTRING(col, 1, CHARINDEX('->', col)-2)),
right_side = LTRIM(SUBSTRING(col, CHARINDEX('->', col) + 2, 4000))
FROM dbo.table;
hi you can use built in functions Left, Right or CHARINDEX etc.
Hope so this example could help
thanks
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.