0

I have the following SQL statement:

Select Choose(1,Orders.Employee, Orders.Customer) as Name1, 
Choose(2,Orders.Employee, Orders.Customer) as Name2, [Shipped Date]
FROM Orders;

However, the field "[Shipped Date]" has a space in it and hence why I have put square brackets around it. The problem is, in SQL view, it seems to think that the sqaure brackets means its a parameter and its asks me for a value but I don't want a value, I want to be able to select that field name!

Thanks all for any help

Georg Fritzsche
  • 97,545
  • 26
  • 194
  • 236
Abs
  • 56,052
  • 101
  • 275
  • 409
  • Your question is very confusing, as your SQL is equivalent to: "SELECT Orders.Employee AS Name1, Orders.Customer AS Name2, [Shipped Date] FROM Orders;". Also, it seems rather inconsistent of you to fully qualify the Employee and Customer fields with the table name and then fail to do so for [Shipped Date]. It really oughtn't make a difference, seems to me, but consistency would have saved you the problem. – David-W-Fenton Sep 06 '09 at 22:10

1 Answers1

1

Try:

 Orders.[Shipped Date]

As an aside, it seems a little odd to use Choose when the descision is already made.

Fionnuala
  • 90,370
  • 7
  • 114
  • 152
  • Thanks that seemed to have worked for me! I am just testing out if I remember Jet SQL as I use to and this SQL statement is not for a live server! :) – Abs Sep 06 '09 at 21:06