sql command which help me to group by or any other query -
i have next query
select a.empid,attendate,status dbo.attendance inner bring together dbo.employeemast e on a.empid=e.empid e.empweekoftype='v'` it gives me:
1500011 2014-08-31 00:00:00.000 1500011 2014-09-01 00:00:00.000 1500011 2014-09-02 00:00:00.000 1500011 2014-09-03 00:00:00.000 1500011 2014-09-04 00:00:00.000 1500011 2014-09-05 00:00:00.000 1500011 2014-09-06 00:00:00.000 p 1500011 2014-09-07 00:00:00.000 1500011 2014-09-08 00:00:00.000 1500011 2014-09-09 00:00:00.000 1500011 2014-09-10 00:00:00.000 1500011 2014-09-11 00:00:00.000 i want arrange row format:
150011 | 2014-08-31 00:00:00.000|2014-09-01 00:00:00.000|2014-09-02 00:00:00.000.... | ........ please suggest me query??
if understood correctly, want convert row based format (which rdbms , sql use) column based one?
this not possible (with standard sql - maybe there vendor specific extensions create easier, didn't specify ans vendor). reason, isn't possible, in nature of rdbms , sql, columns needs defined, while number of rows depends on data.
also trying store different info types in 1 column each row. instead take sql output , transform ever need programming language of choice.
sql
No comments:
Post a Comment