Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access to SQL Server conversion

Status
Not open for further replies.

Bob1129

Programmer
May 26, 2002
3
US
I'm converting an Access db to SQL Server. Several of the Access queries contain FORMAT in the select list such as

Format([Gross_Property_Area],"#,###") AS [Gr Prop Area]

Does T-SQL have anything equivalent or should the formatting be done in the application?

Also, ACCESS has an aggregate function FIRST. How should this be handled in SQL Server?
 
The nearest equivalents to Format are the Convert and Cast functions in T-SQL. They are detailed in SQL Books Online.

There is no equivalent to First in T-SQL. By definition SQL record sets are unordered. There is no first or last row. However, if the rows have a datetime column or an auto number (identity in SQL Server) the Min function provides a near equivalent. Terry L. Broadbent - DBA
Computing Links:
faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top