put data to another Table
-
I have alredy added a DataSet name Publications where I have add three tables. Table(0) is Query_Volume_VolumeLessons Table(1) is Query_Volume_Sectos Table(2) is Query_Volume_Themes Also put data on Table(0) from SQL SERVER DataBase Now How can I put data to Table(1) From Table(0) , using a sqlQuery Thanks
Sarfarj Ahmed
-
I have alredy added a DataSet name Publications where I have add three tables. Table(0) is Query_Volume_VolumeLessons Table(1) is Query_Volume_Sectos Table(2) is Query_Volume_Themes Also put data on Table(0) from SQL SERVER DataBase Now How can I put data to Table(1) From Table(0) , using a sqlQuery Thanks
Sarfarj Ahmed
http://forums.digitalpoint.com/showthread.php?p=2524409 go through this it may be help full to you
-
http://forums.digitalpoint.com/showthread.php?p=2524409 go through this it may be help full to you
insert into t1 (select * from t2)
-
insert into t1 (select * from t2)
Thanks a lot It does work
Sarfarj Ahmed
-
insert into t1 (select * from t2)
Hi I just done it in SQL SERVER DataBase and Create New Table but how I will do it VS and How will it execuite the sql command . Please send me some code, I cant figure it out Thanks
Sarfarj Ahmed
-
insert into t1 (select * from t2)
Public Function Qry_Volume_Sector(ByVal QryVolumeSector As DataTable) As DataTable Dim _DataSet As DataSet = New Publications() Dim _dataTable As Publications.Query_Volume_SectorsDataTable = New Publications.Query_Volume_SectorsDataTable() Dim cmd As SqlCommand = New SqlCommand() Try cmd.CommandType = CommandType.Text cmd.CommandText = "Insert INTO _dataTable (Sector, Voltype, Lesson) Select Title, Voltype, Lesson From QryVolumeSector Where Voltype LIKE '%SECTOR'" '_DataSet.Tables(2).Load(cmd.ExecuteReader()) Catch ex As Exception End Try Return _DataSet.Tables(2) End Function
Sarfarj Ahmed