Forum Discussion
mpereiraTFF
3 years agoNew Member
SQL to change data type to timestamp not working
Hello,
I am using an ODBC mongodb PowerBI connector to connect and filter my data. I am using the following query:
SELECT *
FROM [03.MyTable]
WHERE [Activities] LIKE '%1234-0001%';
-- Modify the data type of the Timestamp column
ALTER TABLE [03.MyTable]
ALTER COLUMN [Timestamp] TIMESTAMP;
I am able to return only values where Activities contains 1234-0001, however, the data type for the "Timestamp" column is still showing as Text instead of TIMESTAMP. I know i can change this later in PowerBI, but I'd like to do this with the SQL.
Any help would be appreciated. Thanks in advance!
1 Reply
- amitchandakSuper User
mpereiraTFF , Can you type cast it in the select statement?