Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi all! We have been experiencing an issue on site where threads have been missing the latest postings. The platform host Vanilla are working on this issue. A workaround that has been used by some is to navigate back from 1 to 10+ pages to re-sync the thread and this will then show the latest posts. Thanks, Mike.
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Excel Query Wizard Date Query not working

  • 15-08-2018 3:45pm
    #1
    Registered Users Posts: 691 ✭✭✭


    Hi

    So I inherited an excel sheet that has a query wizard query.

    The long and short of it is when run you get a date range prompt to filter the data by. It was working fine but now its not. When you run it now it runs but displays all the rows including ones outside the date range.

    SELECT slitemm.kind, slitemm.customer, slcustm.name, slitemm.dated, slitemm.item_no, slitemm.refernce, slcustem.ssdstate, slcustem.vatstate, slcustm.vat_type, slitemm.currency, slcustem.ecvatreg, slcustm.analysis_codes5, slitemm.analysis_codes2, slitemm.amount, slitemm.vat_amount, slitemm.currency_amount, slitemm.currency
    FROM firefly.scheme.slcustem slcustem, firefly.scheme.slcustm slcustm, firefly.scheme.slitemm slitemm
    WHERE slcustem.customer = slcustm.customer AND slitemm.customer = slcustem.customer AND slitemm.customer = slcustm.customer AND ((slitemm.kind='INV') AND (slitemm.dated>=? And slitemm.dated<=?) OR (slitemm.kind='CRN'))

    The affected bit is (slitemm.dated>=? And slitemm.dated<=?) I have also used "between" "and" but get the same issue. I know how to do it in SQL and i think it is something to do with teh formatting of the data but the cells are all set to date range. As I said it was working before which makes it strange.

    I should add this is a SQL query to a separate server the connection string is ok as it pulls the data fine.


Comments

  • Registered Users, Registered Users 2 Posts: 781 ✭✭✭pillphil


    Are all the results (slitemm.kind='CRN'), this will ignore the dates (I think)


  • Registered Users Posts: 691 ✭✭✭$ausage$


    HI Phil I am not sure but I will try to remove the or.


  • Registered Users Posts: 691 ✭✭✭$ausage$


    HI Phil

    That looks to have been the issue. Its weird as i am not sure why they would have wanted that to be in there.


  • Registered Users, Registered Users 2 Posts: 781 ✭✭✭pillphil


    Possibly meant

    ((slitemm.kind='INV' OR slitemm.kind='CRN') AND (slitemm.dated>=? And slitemm.dated<=?))

    That's just speculation though as i've no idea what the data are.


Advertisement