Click here to Skip to main content
15,609,550 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I know that the View is a virtual table of another table. In addition I can't to pass values from a temporary table to a View.

Suppose that I want to use a table from my data base, but I want to add a column in the View instead of the table itself, how I can do that?

The only way that I figured out is creating an additional table which contains all the columns, pass the original to this one (so I will get all the columns with values and the column that I want), and then to the View...
Posted

1 solution

ok I havent tried something like that before USING a view, but what I usually do is to rather use either a temporary table #table_name, a global table ##table_name or a declared table @table_name and I can easily do what you wanted to do. But of course it largely has to do with the scope within which I want to work in, with views I would assume you would want to work in a larger scope..I'm personally going to check up on doing it in a view now!
:)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900