Forum Discussion
Heinrich
2 years agoPost Partisan
Copy all data from direct query table
Hello I have access to CQD (Microsoft Teams Table - Direct Query). I would like to copy static data to a local table. Either some columns or all the data. Do you have a Script or way to accomplish...
saudansari
2 years agoHelper II
Using SQL to copy data from one table to another. Replace the table and column names with the appropriate ones from your Microsoft Teams table:
-- Create a new local table (if it doesn't exist)
CREATE TABLE LocalTable (
Column1 datatype,
Column2 datatype,
-- Add other columns as needed
);
-- Insert data into the local table from the Teams table
INSERT INTO LocalTable (Column1, Column2, ...)
SELECT Column1, Column2, ...
FROM TeamsTable;
Make sure to replace LocalTable, Column1, Column2, etc., and TeamsTable with the actual names used in your scenario. Also, ensure that the datatypes match between the source and destination columns.