Skip to content
Advertisement

Tag: database

Suggested way to resolve column name/type in a view

I have the following problem that I’m trying to find the best solution for. Let’s say I have a view such as the following: What would be the fastest way to resolve the field names and types of the view? For example, on the above I am looking to get something along the lines of: The first approach is just

How to apply max function in a join query?

I am new to SQL Server, I have 3 tables consider an employee table empid name location 1 abc USA 2 efg UK Another table named location-table location holidaycode uk uk1 usa usa1 And also holidaytable: holiday-code date type uk1 2022-01-01 LM uk1 2022-01-01 RMC Expected result is: empid location holidaycode date type 1 2 uk uk1 2022-01-01 RMC suppose

pyodbc is returning binary data in char field

pyodbc with driver “iSeries Access ODBC Driver” is returning binary output, Ex: original data in the table: B06300 what it returns: b’xc2xf0xf6xf3xf0xf0@@@@@@@@@@@@@@@@@@@@@@@@’ My code: I tried putting add_output_converter and encoder to connection but didn’t work Answer I suspect the problem is that the data is defined on the server as CCSID 65535, which means to not translate the data. Using

Advertisement