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

Converting CDbl to SQL Expand / Collapse
Author
Message
Posted Tuesday, April 22, 2014 9:12 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, April 22, 2014 9:25 AM
Points: 1, Visits: 1
Hi,

Hopefully someone can help. i have the following description field in access:

CDbl(1/([NUM_STOP]-1)) AS [TL Equivilent]

Is there any way that i can convert the CDBL to SQL language?
Post #1563897
Posted Tuesday, April 22, 2014 9:21 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Friday, August 29, 2014 2:32 PM
Points: 13,302, Visits: 12,168
t-sql doesn't have a double but you can easily get the results you are looking for.

1/([NUM_STOP]-1.0) AS [TL Equivilent]



_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Moden's splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Post #1563904
Posted Tuesday, April 22, 2014 9:33 AM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Friday, August 29, 2014 11:49 AM
Points: 242, Visits: 815
Sean Lange (4/22/2014)
t-sql doesn't have a double but you can easily get the results you are looking for.

1/([NUM_STOP]-1.0) AS [TL Equivilent]



Notice the 1.0 versus original 1 as t-sql will return int if the 1 is used.
Post #1563911
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse