Results 1 to 2 of 2

SQL To Excel with Like'%[prmcustnum]%'

Threaded View

  1. #1
    Registered User
    Join Date
    03-13-2012
    Location
    Stafford, England
    MS-Off Ver
    Excel 2007
    Posts
    87

    Question SQL To Excel with Like'%[prmcustnum]%'

    Hello,

    Hopefully someone could help me out.

    Within a table I have a data field called Description, these descriptions are manually typed cylinder numbers and are never formatted the same way, within one record there could be several manually entered cylinder numbers.

    Eg here.

    Record 1 BX011321,BX013761,BX008716
    Record 2 CYL NO: BX013761
    Record 3 cyls no:bx013761


    To get the three records above I searched within the description for BX013761 using like '%BX013761%'

    I would like to come up with a bit more of a user friendly version for some of my colleagues so that they can search for these cylinder numbers using a parameter linked to a cell in excel. Something akin to Like'%[prmcustnum]%' - which doesn't work.

    Thank you for reading

    Edit: Here is the full query I am using
    SELECT SOArchivedOrderItems_0.cref, SOArchivedOrderItems_0.ordno, SOArchivedOrderItems_0.desc_, SOArchivedOrderItems_0.desc2, SOArchivedOrderHeaders_0.deldate
    FROM RPWLIVE.SOArchivedOrderHeaders SOArchivedOrderHeaders_0, RPWLIVE.SOArchivedOrderItems SOArchivedOrderItems_0
    WHERE SOArchivedOrderHeaders_0.ordno = SOArchivedOrderItems_0.ordno AND ((SOArchivedOrderItems_0.desc_='%BX013761%') OR (SOArchivedOrderItems_0.desc2='%BX013761%'))
    Last edited by kenny.fsw; 07-02-2013 at 11:32 AM.

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