Skip to content

Tag: sql-server

Add a filter to timeseries pairs

I have a time series plc tag data as below with values in ‘1’ or ‘0’ Using below code I can get the output Output But my requirement is, I only want to query going back 25 hours, so I add a predicate: But this returns the error: Msg 209 Level 16 State 1 Ambiguous column name ‘dat…

How To Prevent Fast Execute Many Giving Truncation Error

Not sure how to reproduce this as I’m not sure what is causing the issue in the first place, however, I have the currently line of code which writes data to an SQL Server Table. However I get the following error: I have checked the sql server and see that varchar has been set to -1 which indicates that …

Display image from SQL DB in QLabel

The database stores images in varbinary format. I am getting data like this b’xffxd8xffxe0x00x10JFIFx00x01x01x01x00x00x00x00xffxe1x00ZExifx… I can save them if I use the code I don’t want to save pictures, i want show them directly in QLabel. How can i do this? Answer I finded solution for m…

Delete sql table rows from python

I can successfully connect my python notebook with sql server this way : Let’s take this sample dataframe : I have a sql table with the same columns, named table_name. Objective : I want to delete in table_name all the rows where a row in df has the same Name, same Date, same Status, and Max = 0 (only i…