Query String error.

Posted on 2005-05-06
Last Modified: 2013-12-18
Can someone please inform me what's missing?

If I use a tdate = 5 then I get data properly, if I use a variable I get no data.

tdate = Right(Year(todaydate),1)
                         FROM D100.ZGLP ZGL,  D100.GLCH GLC
                         WHERE ZGL.YEAR = tdate"
Question by:cyle
    1 Comment
    LVL 46

    Accepted Solution

                             FROM D100.ZGLP ZGL,  D100.GLCH GLC
                             WHERE ZGL.YEAR = " & tdate
    If you put it inside the string, it is no longer a variable... you need it as a string, the "&" operator will take care of both the conversion of tdate to a string and the concatenation with the SELECT-string.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
    Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now