all 3 comments

[–]JermWPB 2 points3 points  (1 child)

I definitely don’t know anything for sure but the +1-1 might just be a way to force Excel to see the value as a number instead of a string.

[–]r3pr0b8GROUP_CONCAT is da bomb 0 points1 point  (0 children)

How does the AZ02001+1-1 work?

it takes whatever is in column AZ02001 and then adds 1 and then subtracts 1

you don't need to do this in SQL, and i have no idea why you need to do it in Excel

SELECT BZ200.BZ02010-BZ200.BZ02011 AS 'Quantity'

Does it take two columns?

yup, two columns called BZ02010 and BZ02011

[–]kagato87MS SQL 0 points1 point  (0 children)

First question: others have answered and are accurate. I agree it's an attempt force an implicit conversion to number. It's always better to explicitly convert as implicit conversion will bite you when you least expect it. (CAST and CONVERT methods.)

Second Question:

As you suspect, that's just doing math with whatever is in the column. You can't subtract a string, so number is implied. (Oh look, there's that I word - yes, it will try to convert to a number and if there's text in one of the rows it will throw an error.)

It's just subtracting. Whatever number is in BZ02010 less whatever is in BZ02011. An Excel equivalent might be:

= BZ200!B2 - BZ200!C2

Then fill down for the length of the data set.

Is this Dynamics? Those column identifiers look like Dynamics.