+ Reply to Thread
Results 1 to 2 of 2

datatype confusion

  1. #1
    Registered User
    Join Date
    05-06-2010
    Location
    Southern California
    MS-Off Ver
    Excel 2007
    Posts
    2

    datatype confusion

    Please Login or Register  to view this content.
    If G18 (svendor) contains 12345, no probelm. If G18 contains abcde, run time error. Where in this code is datatype specified other than string??

    Thanks in advance for your help...
    Last edited by Leith Ross; 05-06-2010 at 01:35 PM. Reason: Corrected Code Tags

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: datatype confusion

    I suspect the SQL would require the string variable be encased within ' ' ... it will work for a numeric string as is as you can use

    SELECT 123 FROM TABLE WHERE 1=1

    whereas you can not use

    SELECT Apple FROM TABLE WHERE 1=1

    it would expect Apple to be a field name in the TABLE - this is seemingly not the case here...

    SELECT 'Apple' FROM TABLE WHERE 1=1

    (syntax may vary pending backend platform)

+ 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