pymssql

python pymssql returns list comma separated, how to change the separator to i.e pipe?

python pymssql returns list comma separated, how to change the separator to i.e pipe? Question: I checked pymssql documents for parameters but I couldn’t find what I was looking for. Basically when I execute the cursor with my SQL query, I always receive the list as comma separated. I’d like to change comma to another …

Total answers: 1

Unable to convert decimal to Decimal128 in python

Unable to convert decimal to Decimal128 in python Question: My Django project (python==3.10.3, Django==4.0.4) is accessing an MSSQL server via pymssql (pymssql==2.2.5), scraping what I need, and getting a list of dicts. I then save to MongoDB (pymongo==4.2.0) but there are decimal values that need to be Decimal128. I found Pymongo: Cannot encode object of …

Total answers: 1

Python prints wrong encoding from MySQL database

Python prints wrong encoding from MySQL database Question: I’m having issues with my Python when calling data from my MySQL database. The database is set as UTF-8 and is containing, special letters such as ‘Æ’ and ‘Ø’. This is the code i use to call the Usernames from my Table # -*- coding: UTF-8 -*- …

Total answers: 1

How to use python to commit data in batches to SQLServer database?

How to use python to commit data in batches to SQLServer database? Question: The data I want to insert into the database likes this: datalist =[[‘2012’, ‘1’, ‘3’, ‘1’, ‘832.0’, ‘261.0’, ‘100.00’], [‘2012’, ‘1’, ‘5’, ‘1’, ‘507.0’, ‘193.0’, ‘92.50’], [‘2012’, ‘2’, ‘3’, ‘1’, ‘412.0’, ‘200.0’, ‘95.00’], [‘2012’, ‘2’, ‘5’, ‘1’, ‘560.0’, ‘335.0’, ‘90.00’], [‘2012’, ‘3’, …

Total answers: 3

mac – pip install pymssql error

mac – pip install pymssql error Question: I use Mac (OS X 10.11.5). I want to install module pymssql for python. In Terminal.app, I input sudo -H pip install pymssql, pip install pymssql, sudo pip install pymssql . But error occur. The directory /Users/janghyunsoo/Library/Caches/pip/http or its parent directory is not owned by the current user …

Total answers: 7

Python 2.7 MSSQL Incorrect Syntax near Order

Python 2.7 MSSQL Incorrect Syntax near Order Question: I have searched high and low to look for the solution to this problem, I am receiving the error when I add the Order by to the statement: (156, “Incorrect syntax near the keyword ‘Order’.DB-Lib error message 20018, severity 15:nGeneral SQL Server error: Check messages from the …

Total answers: 2

trying to install pymssql on ubuntu 12.04 using pip

trying to install pymssql on ubuntu 12.04 using pip Question: I am trying to install pymssql on ubuntu 12.04 using pip. This is the error I am getting. Any help would be greatly appreciated as I am completely lost! Tried googling this but unfortunately to no avail… Downloading pymssql-2.0.0b1-dev-20130403.tar.gz (2.8Mb): 2.8Mb downloaded Running setup.py egg_info …

Total answers: 4

MSSQL in python 2.7

MSSQL in python 2.7 Question: Is there a module available for connection of MSSQL and python 2.7? I downloaded pymssql but it is for python 2.6. Is there any equivalent module for python 2.7? I am not aware of it if anyone can provide links. Important note: in the meantime there is a pymssql module …

Total answers: 4