Skip to content
Advertisement

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 ‘datetime’. Answer You

Database connection broken even with with SQLAlchemy pre-ping

Since I moved my database from a mssql docker container to an azure database as a service my web application( flask) is being disconnected after several minutes. It is simply solved by a refresh of the page but still, there is an issue here. The error raised by SQLAlchemy is an Operational Error (https://docs.sqlalchemy.org/en/14/errors.html#error-e3q8) I tried to implement the pool_pre_ping=True

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 the

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 my problem.

Unable to open pandas python package from Azure Data Studio, while configuring SQL Server 2019 Big Data Cluster

I’m working on setting up SQL Server 2019 Big Data Cluster. One of the initial steps is installing python package: panda. Post installation, when I try to import the package, I get the following exception in Azure Data Studio. import pandas ModuleNotFoundError: No module named ‘pandas’ I don’t get this exception, when I load the package from command-prompt/python. This could

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 in

Advertisement