Field name truncation

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a SQL Statement that includes the foollowing:
Transaction.Program, Transaction.[Special Use],
Sum(Transaction.OrigBudgetAmt) AS 0059
FROM [Transaction]

The AS 0059 is the problem. When I save the query, the designer truncates
the 0059 to 59. I have tried to enclose the field name in brackets [0059] but
the designer still truncates the name when it is saved.

This was working under Office 2000.

Any suggestions will be greatly appreciated.
 
Syntax issue... 0059 is seen as a number hence the 59.

Aliases can't start with a number.... I assume your query is going into a
form or report. Set the caption their not in SQL.

Regards....

sorry I didn't really help.
 
Yes, thanks.

Also.. [0059] and '0059' .

Gina Whipp said:
Did you try: "0059"


Ron Sellers said:
I have a SQL Statement that includes the foollowing:
Transaction.Program, Transaction.[Special Use],
Sum(Transaction.OrigBudgetAmt) AS 0059
FROM [Transaction]

The AS 0059 is the problem. When I save the query, the designer truncates
the 0059 to 59. I have tried to enclose the field name in brackets [0059]
but
the designer still truncates the name when it is saved.

This was working under Office 2000.

Any suggestions will be greatly appreciated.
 
I think that you can work around the problem with the following technique:
1) Open the query in design mode (show the designer, not the SQL statement.
2) Change the field selector “59: OrigBudgetAmt†to “0059: OrigBudgetAmtâ€.
3) Right click on the form and select “Datasheet Viewâ€. Observe that the
field name is 0059.
4) Click the “X†at the top right and save the change (do not change back to
“Design View†or to “SQL Viewâ€).
5) Right click on the Query title and select “open†(not design). The field
should display with the “0059â€.
Note that you did not select the “SQL View†option at any time. If the form
opens in “SQL Viewâ€, change to “Design Viewâ€, save and close the form and
then try again.

The problem appears to occur when the designer parses the SQL statement
after a change.
 
Back
Top