How do I compare two values when one value(data type) is
char and the other is an integer?

Answers were Sorted based on User's Feedback



How do I compare two values when one value(data type) is char and the other is an integer?..

Answer / guest

use the CONVERT Function.

Is This Answer Correct ?    5 Yes 0 No

How do I compare two values when one value(data type) is char and the other is an integer?..

Answer / sagun sawant

I will convert column with integer datatype to char because
i can not convert char to integer if column contains any
alphabet and then i will compair two values

Is This Answer Correct ?    4 Yes 1 No

How do I compare two values when one value(data type) is char and the other is an integer?..

Answer / rajeevrohilla

You Can USe Either Convert or Cast Function for this

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More SQL Server Interview Questions

Following are some of the question related to below mentioned query? select e1.salary from employee3 e1 where 2= ( select count(distinct(e2.salary)) from employee3 e2 where e2.salary>=e1.salary ) 1) What the query returns? 2) How it works? - Detail explanation (what the sub query does, why it is (where 2=)....etc...Please?

5 Answers  


What are the requirements on sql server network connections?

0 Answers  


How do you know if sql server is running on your local system?

0 Answers  


Explain the use of containers in ssis?

0 Answers  


What do you understand by a stored procedure?

0 Answers  






What is an expression in ms sql server?

0 Answers  


What is SQL server agent?

2 Answers   HCL, SAP Labs,


What is a user-defined function in the sql server and what is its advantage?

0 Answers  


what are constraints? : Sql server database administration

0 Answers  


What is the difference between a "where" clause and a "having" clause?

0 Answers  


When we are using this query to shrink the log file,what exactly it will execute internally? Do we lose any data when we run this script? which data it will truncate in the log file and where it is saved. Please let me know... USE DatabaseName GO DBCC SHRINKFILE(<TransactionLogName>, 1) BACKUP LOG <DatabaseName> WITH TRUNCATE_ONLY DBCC SHRINKFILE(<TransactionLogName>, 1) GO

1 Answers   Cognizant,


Hi Friends, I have a table in which there are thousands of records and in city field there is NULL value for all records now i want to change that null value with distinct values in each record say delhi, bihar, agra, jaipur etc, what will be the query for that????? its not possible to update thousands of records one by one. is there any alternative ...? Plz help ... its urgent Thanx in advance

1 Answers  


Categories