With T-SQL if you write something like: amount = 1 and amount is not a defined column in the table you are using to draw data from, it will make a column named "amount" and fill it with the value 1
In Jet-SQL with Microsoft Acces if you do this you get a pop up box that ask you to enter the parameter value for "amount".
Why and how can this be changed to get the same results that I get with T-SQ...
User Profile
Collapse
-
Creating a column to hold data in Access SQL
With T-SQL if you write something like: amount = 1 and amount is not a defined column in the table you are using to draw data from, it will make a column named "amount" and fill it with the value 1
In Jet-SQL with Microsoft Acces if you do this you get a pop up box that ask you to enter the parameter value for "amount".
Why and how can this be changed to get the same results that I get with T-SQ... -
Thank You -- That solves the problem -- I see in Jet SQL that I have to use an "IIF" as opposed to "case when" in T-SQLLeave a comment:
-
Lawless started a topic SQL query runs in Microsoft SQL Server Management Studio but not in Access 2007in AccessSQL query runs in Microsoft SQL Server Management Studio but not in Access 2007
The following section, from an sql query, runs perfectly in Microsoft SQL Server Management Studio:
Code:the_section=(case when line_no= 101 then 1 when line_no between 102 and 105 then 2 when line_no between 106 and 112 then 2 when line_no between 201 and 219 then 3 when line_no between 703 and 704 then 2 when line_no between 801 and 822 then 2 when line_no between 901 and 910 then 2 when line_no
No activity results to display
Show More
Leave a comment: