Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

"\1" in a formula (Translating MSAccess to T-SQL) Expand / Collapse
Author
Message
Posted Friday, February 1, 2013 5:56 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Friday, February 7, 2014 7:35 AM
Points: 20, Visits: 92
Well I feel dumb asking this, but I've Googled my fingertips off ...

I have been given some SQL from MSAccess, and asked to translate it to T-SQL.

One of the expressions selected is "Select [value]\1 as [Field1]"

Does anyone have any idea what the "\1" is meant to do ?

Unfortunately it seems I can find out how to build half an atom bomb on google, but something as simple as a "\" ... is beyond me

Many Thanks



Post #1414613
Posted Friday, February 1, 2013 6:15 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 6:46 AM
Points: 13,646, Visits: 11,524
This is used to convert the column value to an integer, also called "integer division".

Table of operators

Since you are dividing by 1, this is basically a shorthand to convert the value column to integers.




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1414630
Posted Friday, February 1, 2013 6:28 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Friday, February 7, 2014 7:35 AM
Points: 20, Visits: 92
So simple, am kicking myself !

Many thanks for that, and the included link.

:)

Post #1414641
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse