question

TvanStiphout avatar image
0 Votes"
TvanStiphout asked ErlandSommarskog commented

What does { signify?

A365 with SQL Server 2019
I'm profiling what Access does when running this update statement against a linked table:
CurrentDb.Execute "update dbo_TomTest set [myNVarchar_255] = Trim$([myNVarchar_255]) where ID = 1", dbFailOnError Or dbSeeChanges

Profiler sees:
UPDATE "dbo"."TomTest" SET myNVarchar_255={fn ltrim({fn rtrim(myNVarchar_255 )})} WHERE ("ID" = 1 )

What are those curly brackets?
What is fn_ltrim and fn_rtrim? They do not occur in sys.objects. How can I get more info about them?

sql-server-transact-sql
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

TvanStiphout avatar image
0 Votes"
TvanStiphout answered ErlandSommarskog commented

One of my fellow Access MVPs knew the answer:
Those are the ODBC SQL syntax. You can execute them in SSMS too since SQL Server supports ODBC SQL directly as well as Transact-SQL.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Nah, they don't always work in SSMS. Some of them work in SSMS, since T-SQL understands them. But SSMS itself uses SqlClient and does not make any sense out of them.

However, the command-line tool SQLCMD uses ODBC and it does understand this ODBC syntax.

0 Votes 0 ·
TomPhillips-1744 avatar image
0 Votes"
TomPhillips-1744 answered
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.