• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

SQL query in Excel vba -> CAST problem

rene oudeman

New Member
Hi,

i am working with the excel sql database as in the example on this site.
(adodb connection to the worksheet)
it works just fine, but i am having trouble doing bitwise checks.
Code:
"WHERE CAST([group_desc$].[category_id1] as UNSIGNED INTEGER) & " & tmpCat_1 & " <> 0;"
-> tmpCat is a number to test for

(the isnot sign is eaten by the markup somehow)

anyone an idea?
 
Hi Rene ,

Would it be :

"WHERE (CAST([group_desc$].[category_id1] as UNSIGNED INTEGER) & " & tmpCat_1 & ") <> 0;"

with the two additional brackets ?

Narayan
 
Hi,

What driver are you using? I doubt that Cast() is a valid function and that Unsigned Integer is a valid data type.
Also I'm not sure what the ampersand in the string after the cast is meant to do?

Perhaps post your full code / link to sample file?
 
Hi,

I fixed it. I am running the stuff in excel tables, and the formating can be changed in the cells. It works now.
Thanks,

Rene
 
Back
Top