oracle - How to generate Multi-row for each row in a table using SQL only -
oracle - How to generate Multi-row for each row in a table using SQL only -
possible duplicate: split column multiple rows
i have table contains next data:-
name --------- mouse,keyboard,screen harddisk,cable processor
i need create query retrieve info table follow:-
name -------- mouse keyboard screen harddisk cable processor
first need split function like: http://blog.logiclabz.com/sql-server/split-function-in-sql-server-to-break-comma-separated-strings-into-table.aspx
then can run:
select * mytable t cross apply dbo.split(t.name) s
and s.items contain want.
sql oracle
Comments
Post a Comment