Convert INT to VARCHAR SQL
Posted By: Anonymous
I am using Sybase and I am doing a select which returns me a column called “iftype”, but its type is int and I need to convert into varchar. When I try to do the select without the convert function I get this error:
Error code 257, SQL state 37000: Implicit conversion from datatype ‘VARCHAR’ to ‘INT’ is not allowed. Use the CONVERT function to run this query.
I dont know how to implement the function CONVERT
. Can anyone help me, please ?
Solution
Use the convert function.
SELECT CONVERT(varchar(10), field_name) FROM table_name
Answered By: Anonymous
Related Articles
- Is CSS Turing complete?
- Log record changes in SQL server in an audit table
- Understanding implicit in Scala
- SQL query return data from multiple tables
- Drop all the tables, stored procedures, triggers,…
- From a Sybase Database, how I can get table…
- Insert into not inserting for mysql
- JSON Dump a string surrounded by single quotes and…
- What are access specifiers? Should I inherit with…
- How do I include certain conditions in SQL Count
- How do I obtain a Query Execution Plan in SQL Server?
- How to query for Xml values and attributes from…
- Callback functions in C++
- django-restframework. How to change many to many…
- Can't resolve the implicit for a constrained class…
- 3 column layout HTML/CSS
- How to use local storage to access combined reducer…
- How to access this variable from my store / state in…
- Using StringWriter for XML Serialization
- ReactJs : Nested State Not getting Updated
- Should MySQL have its timezone set to UTC?
- Detecting when Partial extends T
- HQL Responding with…
- How to filter a RecyclerView with a SearchView
- Add pagination params to axios in Vue
- SQL NVARCHAR and VARCHAR Limits
- T-SQL: Export to new Excel file
- Creating a list of single type of objects
- no match for ‘operator
- How do SO_REUSEADDR and SO_REUSEPORT differ?
- How do I set initial state in Vuex 2?
- Typescript: Type a group of partially applied…
- SDL_SetRenderTarget() hangs for a while if multiple…
- TypeScript metadata reflection references other…
- How do I get the Back Button to work with an…
- Best practices for SQL varchar column length
- How to take backup of a single table in a MySQL database?
- MySQL (8.0.24 Community Server - GPL) does not…
- Design DFA accepting binary strings divisible by a…
- Adding a new column into sqlite produces an error:…
- Change column type in pandas
- Find and replace entire mysql database
- How to place object files in separate subdirectory
- VueJS Dynamic Model Binding
- Simulating group_concat MySQL function in Microsoft…
- How to stop function allowing Strings or Characters?…
- How to check if a table exists in a given schema
- Flutter - Cubit - loaded state - managing…
- Name type returned by inner closure
- vue watch mapState not working
- Search for a string in all tables, rows and columns of a DB
- Best practice when asserting non-null on a value…
- Failed when converting the nvarchar value to to data…
- My submit button is not getting enabled . How do i do that?
- vuex- state returned as function or object literal
- NextJS - can't identify where state change is…
- Filter Vuex state
- No function matches the given name and argument types
- Illegal mix of collations (utf8_unicode_ci,IMPLICIT)…
- Passing address of a variable by reference in C++
- Left Outer Join using + sign in Oracle 11g
- Is this request generated by EF Core buggy or is it my code?
- "explode() expects parameter 2 to be string, object…
- How do I update the quantity without duplicate in redux?
- How can I get column names from a table in SQL Server?
- Disable all table constraints in Oracle
- Conversion failed when converting the varchar value…
- Maximum size of a varchar(max) variable
- DROP IF EXISTS VS DROP?
- How to find column names for all tables in all…
- Search All Fields In All Tables For A Specific Value…
- How to make vuetify v-data-table vertically span all…
- How to include a PHP variable inside a MySQL statement
- error: strcpy was not declared in this scope
- Why is conversion from string constant to 'char*'…
- Generate SQL Create Scripts for existing tables with Query
- Conversion of a varchar data type to a datetime data…
- Setting equal heights for div's with jQuery
- Converting Oracle SQL Procedure into MySQL Stored Procedure
- How to implement a basic iterative pushdown…
- How to get the in HTML tables to fit content, and…
- How to return result of a SELECT inside a function…
- Next.js making a timeout stop with a react state
- I use useState hock to store the value but it did not update
- What is causing ERROR: there is no unique constraint…
- Creating a custom counter in Spark based on…
- How to avoid the need of writing…
- Subtracting Dates in Oracle - Number or Interval Datatype?
- vuex - is it possible to directly change state, even…
- Vuex update array as value of object
- The localStorage is not refreshing in Vuex
- Database development mistakes made by application developers
- Remix error The transaction has been reverted to the…
- Bind json data into two dependent dropdown list in…
- AngularJS ui-router login authentication
- Receive WebSockets data from vuex and…
- Setting DEBUG = False causes 500 Error
- How can I find the product GUID of an installed MSI setup?
- The image I am adding as a button in Tkinter is not…
- How to implement a FSM - Finite State Machine in Java
Disclaimer: This content is shared under creative common license cc-by-sa 3.0. It is generated from StackExchange Website Network.