How to divide by zero and nulls in sybase?



How to divide by zero and nulls in sybase?..

Answer / Mona Chauhan

In Sybase, dividing by zero or null results in an error. To handle this, you can use the ISNULL function to replace null values with a default value, and COALESCE to replace all null values with a single default value. For example, to divide two columns where one may contain nulls, you could do: SELECT ISNULL(col1, 0) / ISNULL(col2, 1) as result.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Sybase Interview Questions

What are the advantages that you can get from mainframe connect in sybase?

1 Answers  


List some of the products of sybase.

1 Answers  


You need to multiply all values of a single column. How would you do that?

1 Answers  


How do I configure the burn factor in sybase?

1 Answers  


can i gat any proper material for sybase if possible plz let me know balaji.cc1@gmail.com

2 Answers  


How do I check if log truncation is blocked in sybase?

1 Answers  


What is isql in sybase?

1 Answers  


Tempdb is full. How would you clear it?

1 Answers  


Who owns sybase?

1 Answers  


You need to remove the affected rows and dashes. How would you do that?

1 Answers  


What is an advantage to using a stored procedure as opposed to passing an sql query from an application ?

1 Answers  


The secondary truncation point is on. How would you clear the logsegment?

1 Answers  


Categories