Skip to content
Advertisement

adding trimmed substrings

using sql server:

I have a number of commands that trim a txt file, example:

etc…

I have a number of these.

current output:

i need the total value column to do a calculation of all my days old columns

I need to be able to add the results of these commands into a new column named “total”. is there an easy way to do this?

Advertisement

Answer

What you now have is:

Instead, put your formulas in a cross apply:

Now you can add a new column to your select which will be :

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement