+ Reply to Thread
Results 1 to 2 of 2

Wild card in Excel SQL

  1. #1
    Registered User
    Join Date
    11-14-2007
    MS-Off Ver
    2007
    Posts
    61

    Cool Wild card in Excel SQL

    Hi,
    A macro with SQL code reads cell in my Excel and use it in SQL WHERE statment:
    The cell should include system serial number.
    I need the SQL query to read all the serial numbers.
    What should I write in the cell?

    The SQL code looks like that:

    ...
    WHERE
    (tbl.mr.[sysCode]=55)
    AND (tbl.mr.[sysNum]=?)

    For the ? parameter, I use cell in my Excel.

    Tnx!

  2. #2
    Valued Forum Contributor tony h's Avatar
    Join Date
    03-14-2005
    Location
    England: London and Lincolnshire
    Posts
    1,187

    Re: Wild card in Excel SQL

    ...
    WHERE
    (tbl.mr.[sysCode]=55)

    just leave out the "AND ..."


    click on the * Add Reputation if this was useful or entertaining.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1