September 20, 2024 at 3:23 pm
We have a third part software and looking at some of their SQL we found this
INSERT INTO tblSoftware ( Inventory , Software, [Name] , Manufacturer , [Language] , [ Version ] , OSType , [Executable] , ExecutablePath , ExecutablePathReversed , IOS , Reg , TS , VT ) – = inv.tblSoftware
I have never see -=Table what are they doing?
September 21, 2024 at 12:24 pm
We have a third part software and looking at some of their SQL we found this
INSERT INTO tblSoftware ( Inventory , Software, [Name] , Manufacturer , [Language] , [ Version ] , OSType , [Executable] , ExecutablePath , ExecutablePathReversed , IOS , Reg , TS , VT ) – = inv.tblSoftware
I have never see -=Table what are they doing?
To the best of my knowledge, the -= in SQL Server is known as a "Compound Operator" and you can read about those at the following link... I used to use += a fair bit.
https://learn.microsoft.com/en-us/sql/t-sql/language-elements/compound-operators-transact-sql
The thing is, I've not seen it in an INSERT statement before and certainly not in the context of a Table. It does, in fact, produce an error marking in SQL Server.
Could it be that they've simple found a way to mask a part of the code that's actually being executed or perhaps you sampled their code incorrectly? It might help if we saw the proverbial "rest of the story" in the code that follows that insert.
--Jeff Moden
Change is inevitable... Change for the better is not.
September 21, 2024 at 1:11 pm
I think it is a typo, they probably meant to type '-- = inv.tblSoftware'
Which would mean that inv.tblSoftware is just a comment for clarity, describing something about the insert operation.
September 21, 2024 at 5:09 pm
I think it is a typo, they probably meant to type '-- = inv.tblSoftware'
Which would mean that inv.tblSoftware is just a comment for clarity, describing something about the insert operation.
Agreed on that. Even things like MS Word will sometimes convert two shorter dashes to a single "m-dash".
--Jeff Moden
Change is inevitable... Change for the better is not.
September 21, 2024 at 8:26 pm
I think it's actually an en dash, not that it makes any difference to the point you're making!
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
September 21, 2024 at 8:45 pm
Jonathan AC Roberts wrote:I think it is a typo, they probably meant to type '-- = inv.tblSoftware'
Which would mean that inv.tblSoftware is just a comment for clarity, describing something about the insert operation.
Agreed on that. Even things like MS Word will sometimes convert two shorter dashes to a single "m-dash".
I've had it happen with MS OneNote which looks like a text editor.
September 25, 2024 at 3:00 pm
Thanks for the response, I bet your correct -- comment
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply