Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2003
    Posts
    8

    Post Unanswered: Jibberish characters appearing in QUERY results

    Hi.

    I'm having a problem with a UNION QUERY - the union query works fine, but unfortunately, for any results that are displayed in my [CR] field, appear as a jibberish characters:

    Code:
    Centre	Acc	Name	DR	CR	BAL	Period	Desc	Amt
    500002	411111	SAL		⣶轜ᑢ샅	59785	1	KS SAL	-10792.77
    What causes this? I'm using ACCESS2000 - this query was previously run in ACCESS97 - and all results were displayed perfectly. Is there something in Access2000 that causes this??

    Please help!

    -soc

  2. #2
    Join Date
    Sep 2003
    Posts
    8

    Re: Jibberish characters appearing in QUERY results

    Ok, this was my SQL statement that caused the jibberish:

    Code:
    SELECT TRANSACTIONS.Centre, TRANSACTIONS.AccNo, TRANSACTIONS.AccName, TRANSACTIONS.Amount AS [DR], NULL AS [CR], BALANCES.Amount AS Balance, TRANSACTIONS.Period, TRANSACTIONS.Desc, TRANSACTIONS.Amount
    ....
    WHERE Amount >= 0
    UNION
    SELECT TRANSACTIONS.Centre, TRANSACTIONS.AccNo, TRANSACTIONS.AccName, NULL AS [DR], TRANSACTIONS.Amount  AS [CR], BALANCES.Amount AS Balance, TRANSACTIONS.Period, TRANSACTIONS.Desc, TRANSACTIONS.Amount
    ...
    WHERE Amount < 0
    I've managed to find a work around to the problem:

    Code:
    SELECT TRANSACTIONS.Centre, TRANSACTIONS.AccNo, TRANSACTIONS.AccName, TRANSACTIONS.Amount AS [DR], ' ' AS [CR], BALANCES.Amount AS Balance, TRANSACTIONS.Period, TRANSACTIONS.Desc, TRANSACTIONS.Amount
    ....
    WHERE Amount >= 0
    UNION
    SELECT TRANSACTIONS.Centre, TRANSACTIONS.AccNo, TRANSACTIONS.AccName, ' ' AS [DR], TRANSACTIONS.Amount  AS [CR], BALANCES.Amount AS Balance, TRANSACTIONS.Period, TRANSACTIONS.Desc, TRANSACTIONS.Amount
    ...
    WHERE Amount < 0
    Replacing NULL with ' ' seems to get rid of my jibberish - but what I'd like to know is...is this a PROPER way of handling NULL values in a field? Or could I cause trouble for myself in the future??

    Access97 seems to be able to process NULL as a field value - but Access2000 has a problem with it.

    Any one have any opinions? or other suggestions??

    -soc

Posting Permissions

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