Hi I have a table:
Create table
( max_value nvarchar(50))
Now I want to input all the max values within a particular column to this table.
i.e insert into table
select Max(column) from Table1
my code runs it in a loop so it will put all max columns of a table into this field.
My problem is I can have varying column types. i.e. Column with varchar, column with numeric, column with money.
What can i assign the column Max_Value in my table to handle all of these different datatypes??
The query can work, but produces an error when it gets to the money type columns