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 «««1234

Casting question Expand / Collapse
Author
Message
Posted Friday, March 15, 2013 4:08 PM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Yesterday @ 3:45 PM
Points: 21,913, Visits: 34,671
For some reason I just didn't catch the CHAR(3) in the question. Even if I had, I would still have picked '0'.



Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Post #1431826
Posted Friday, April 12, 2013 1:21 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, July 15, 2015 1:58 AM
Points: 1,345, Visits: 1,201
Neither I don't understand for the reason for char(3).
Post #1441589
Posted Monday, April 15, 2013 2:22 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Friday, July 24, 2015 8:43 AM
Points: 3,600, Visits: 2,723
Seems pretty simple question to me. An easy point.
Post #1442199
Posted Monday, June 15, 2015 2:56 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, July 16, 2015 4:01 AM
Points: 1,356, Visits: 304
Why is the type char(3) ?

If I use one of the below selects, then it is all the same !

select convert (char(3),11/9)
select convert (int,11/9)
select convert(float ,11/9)
Post #1694504
Posted Monday, June 15, 2015 1:15 PM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Yesterday @ 4:48 PM
Points: 1,723, Visits: 2,369
good question on datatype conversion practices.

Thanks.
Post #1694696
« Prev Topic | Next Topic »

Add to briefcase «««1234

Permissions Expand / Collapse