|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Move Column in Datatable?Is there a way to re-order datacolumns? Assume I do a "Select * from (insert
table here)" and insert the return rows into a datatable, so the exact fieldnames and order of the fields are not known at runtime. Assume I have to move a column called Duration to appear after the column EmailAddress but these are the only two columns I know about in the table and there could be other unknown columns also. I have to keep this data in a Datatable object if possible since our reporting system takes datatables as input parameters. I have looked at Dataviews but I am not sure this is going to get me my desired result. Any help is much appreciated. Just do a:
SELECT EmailAddress, Duration from <table_name> Show quote "Frank" <Fr***@discussions.microsoft.com> wrote in message news:083AFA0A-0B26-48C6-9E95-5576F9527FA6@microsoft.com... > Is there a way to re-order datacolumns? Assume I do a "Select * from > (insert > table here)" and insert the return rows into a datatable, so the exact > fieldnames and order of the fields are not known at runtime. > > Assume I have to move a column called Duration to appear after the column > EmailAddress but these are the only two columns I know about in the table > and > there could be other unknown columns also. I have to keep this data in a > Datatable object if possible since our reporting system takes datatables > as > input parameters. I have looked at Dataviews but I am not sure this is > going > to get me my desired result. > > Any help is much appreciated. |
|||||||||||||||||||||||