Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"000" nvarchar converting to "0000/0/0" #337

Open
kent-orr opened this issue Apr 10, 2022 · 2 comments
Open

"000" nvarchar converting to "0000/0/0" #337

kent-orr opened this issue Apr 10, 2022 · 2 comments

Comments

@kent-orr
Copy link

Windows 10, pulling from Microsoft SQL Server.

I have a column in the database that has strings "000", "001" etc. which are changing to "0000/0/0" or sometimes "0000/0/5" when I convert the cursor to a DataFrame. The DataFrame result is a String. The conversion is not reliable, "002" does not always convert to "0000/0/2".

Below the stdout from the raw cursor object. the column in questions is named new_chlocation.

ODBC.Cursor{false, false}(ODBC.API.Handle(3, Ptr{Nothing} @0x00000000797cd360), -1, 1, 
[:new_chlocation], Type[Union{Missing, String}], Dict(:new_chlocation => 1), 0, 1, 
ODBC.Binding[ODBC.Binding(1, -9, ODBC.Buffer(UInt8[0x30, 0x02, 0x01, 0x02, 0x00, 0x00]), 6, 
[224975840], false, 0)], AbstractVector[], Any["column name" "column type" "sql type" "c type" 
"sizes" "nullable" "long data"; :new_chlocation Union{Missing, String} "SQL_WVARCHAR" "SQL_C_CHAR"
6 true false])
@ssingh13-rms
Copy link

ssingh13-rms commented Apr 10, 2022

could you also share the version of ODBC.jl you're using? Julia too please.

@kent-orr
Copy link
Author

git-tree-sha1 = "7e3ce82387793ee6e787f9dbf78728602f97c7ad"
uuid = "be6f12e9-ca4f-5eb2-a339-a4f995cc0291"
version = "1.0.4"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants