0

I am currently working on a warehouse management system operated on a Raspberry Pi. Scanning a QR code should open the correct line of the database. I read the text file/CSV file containing the QR code into my Table QR database via: insert into QR values(readfile("C:\...\IDNumberfromQR.csv"));

this works, because the ID number appears in the database in the correct table. However, the content of the text file is read in the file type "Blob". If I now make a table comparison via SELECT * from warehouse management table where PulverID=( select code from QR); nothing appears. However, if I enter the ID number on the computer in the table QR.code and do not have the ID read in via my file, the line I am looking for appears. So it is obviously a Data format problem. What I already tried: I have already set both to blob in the settings. This still did not work. The functions found in the SQLiteStudio tutorial like import(file,format,table) don't work either. Does anyone have any idea how i can solve this problem? Is it possible to read a CSV file as double?

  • How about opening 2 SQL Editor windows, tile them horizontally (put them next to each other) and query blobs to compare in each of them, then right click on them and pick "Edit in value editor", where you can either compare by text value, or even switch to Hex view to compare byte by byte. – Googie Jun 30 '21 at 09:45
  • Thanks for the help. I was able to solve the problem by changing the corresponding two columns within SQLiteStudio to BLOB. However, within the query I converted the QR Code to Double. Here is my code: `SELECT Warehouse.PowderID, Warehouse.Input, Warehouse.Note, Warehouse.Compartment, Warehouse.PowderName, Warehouse. "Quantity in kg" from Warehouse join QR on Warehouse.PowderID = cast (QR.code as DOUBLE);` – PatriciaAM Jul 05 '21 at 10:30

0 Answers0