I have a temporary table named #Temp. SQL code: Select * FROM #Temp results in
Account, Per01, Per02, Per03 ... Per12 as field headings.
Is it possible to add a "Total" field based on a wildcard such as "Per*" ?
I know that I can add each period to obtain what I want. The question is around wildcards.
Select *, Per01+Per02+Per03+Per04+... as Total
From #Temp
Your suggestions are appreciated.
Total Period Columns by Wildcard
-
- GoldLounger
- Posts: 2628
- Joined: 26 Jan 2010, 16:31
- Location: Southern California
Total Period Columns by Wildcard
Regards,
John
John
-
- Administrator
- Posts: 78390
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Total Period Columns by Wildcard
There is no built-in option for this. You might create a VBA function for this purpose; it's up to yo to decide whether it's worth the trouble.
Best wishes,
Hans
Hans
-
- GoldLounger
- Posts: 2628
- Joined: 26 Jan 2010, 16:31
- Location: Southern California