The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
The Guiding Principles and New Rules document is now in effect.

SQL Experts - Access Question

DeebaserDeebaser on my way to work in a suit and a tieAhhhh...come on fucking guyRegistered User regular
edited October 2009 in Help / Advice Forum
Title shamelessly stolen.


Im trying to simplify a report so that I can just run it out of access. One line of code is giving me problems.


i.varchar_column like ("%" + CONVERT(varchar(20), lol.int_column) + "%")

How can I convert this into access-approved sql?

Deebaser on

Posts

  • rfaliasrfalias Registered User regular
    edited October 2009
    Use * instead of %?

    rfalias on
  • JoeUserJoeUser Forum Santa Registered User regular
    edited October 2009
    Try & instead of +

    JoeUser on
  • AumniAumni Registered User regular
    edited October 2009
    Edit: You know what? You may just need the % switched to & after all.

    Just get rid of the Convert part so it just reads

    ("%" & lol.int_column & "%")

    Access (2003, not sure on 2007) doesn't do Convert. If the above doesn't work:

    ("%" & str(lol.int_column) & "%")

    I've also edited this post way too many times.

    Aumni on
    http://steamcommunity.com/id/aumni/ Battlenet: Aumni#1978 GW2: Aumni.1425 PSN: Aumnius
Sign In or Register to comment.