Results 1 to 7 of 7

Thread: SQL question in DAO.. seems simple.

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2000
    Posts
    54
    Ok well basically i have a field in my database with a forward slash in the middle of the field name. The first Sql statement works perfectly where i've omitted the field. And the second one where i put it in.. does not work.

    If anyone has any ideas or suggestions i'd appreciate it greatly. I've been working on this program for about two months and something so rediculous as an sql statement error is killing me. Thanks Again

    Set rstTemp = conMAS90.OpenRecordset("
    SELECT ARN_InvHistoryHeader.CustomerNumber,
    ARN_InvHistoryHeader.InvoiceNumber,
    ARN_InvHistoryHeader.SOOrderDate,
    ARN_InvHistoryHeader.SOShipDate,
    ARN_InvHistoryHeader.SOSourceJournal,
    ARO_InvHistoryDetail.SOItemNumber,
    ARO_InvHistoryDetail.SOHasPriceBeenOverridden,
    ARO_InvHistoryDetail.SOQtyShipped,
    ARO_InvHistoryDetail.SOUnitPrice
    FROM ARN_InvHistoryHeader, ARO_InvHistoryDetail
    ", dbOpenDynamic)


    Set rstTemp = conMAS90.OpenRecordset("SELECT ARN_InvHistoryHeader.CustomerNumber, ARN_InvHistoryHeader.InvoiceNumber, ARN_InvHistoryHeader.SOOrderDate, ARN_InvHistoryHeader.SOShipDate, ARN_InvHistoryHeader.SOSourceJournal, ARO_InvHistoryDetail.SOItemNumber, ARO_InvHistoryDetail.SOHasPriceBeenOverridden, ARO_InvHistoryDetail.SOQtyShipped, ARO_InvHistoryDetail.SOUnitPrice, ARO_InvHistoryDetail.Extd/ChargeAmount FROM ARN_InvHistoryHeader, ARO_InvHistoryDetail ", dbOpenDynamic)

    ~Jay

  2. #2
    Addicted Member PsudoLogical's Avatar
    Join Date
    Dec 2000
    Location
    Upstate N.Y.
    Posts
    144
    Yeah... try using brackets.....

    ARO_InvHistoryDetail.[Extd/ChargeAmount]

  3. #3

    Thread Starter
    Member
    Join Date
    Aug 2000
    Posts
    54
    the brackets didnt work.. I tried every form of bracket on my keyboard..

    any other ideas?

    Thanks again..
    ~Jay

  4. #4
    Addicted Member PsudoLogical's Avatar
    Join Date
    Dec 2000
    Location
    Upstate N.Y.
    Posts
    144
    Which data access method are you using... DAO, or ADO?? Also, what database are you using? I know the brackets work with ADO 2.1 and with an Access 2000 database.

  5. #5
    Addicted Member PsudoLogical's Avatar
    Join Date
    Dec 2000
    Location
    Upstate N.Y.
    Posts
    144
    So sorry.... I didn't remember that the heading of this post says DAO... I feel like an idiot... let me check into special characters and DAO

  6. #6

    Thread Starter
    Member
    Join Date
    Aug 2000
    Posts
    54
    specifically the database is from a warehouse package software called sotamas90. I dont think that will help much.. its got its own ODBC driver and everything..

    I really appreciate the help..
    ~Jay

  7. #7

    Thread Starter
    Member
    Join Date
    Aug 2000
    Posts
    54
    Well i'm still looking.. cant find any solutions. If anyone finds a solution please post it for me.. thank yoou.

    ~Jason

Posting Permissions

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



Click Here to Expand Forum to Full Width