Skip to main content
Question

SQL Functions CAST , CONVERT not working in Database: Export to data table.

  • 23 May 2024
  • 2 replies
  • 62 views

The sql functions CAST CONVERT not working in AA360 Database: Export to Data Table.

2 replies

Userlevel 1
Badge +3

Hi @manicarina,

Here are a few steps you can try:

  1. Check Syntax and Data Types:

    • Ensure that the syntax of your SQL query is correct. Double-check the usage of CAST and CONVERT.
    • Verify that the data types you’re converting between are compatible. For example, if you’re converting an integer to a string, use CAST(id AS varchar(200)).
  2. String Truncation:

  3. Sample Query:

    • To force integer format, try the following query:
      SELECT CAST(CAST(id AS BIGINT) AS varchar(200)) FROM [Programmer].[dbo].[Diabetic Patient 12 years ove$]

Remember to adapt these suggestions to your specific use case. If you encounter any further issues, feel free to ask for more assistance! 😊🔍

 

Badge +1

Here is the answer goodgist generated for you. Find it helpful ?
 

 

Reply