Toad World® Forums

Toad for SQL Server


#1

hello, I’ve still installed Toad for SQL Server, and executing the following select

select CONCAT(‘BPF’, t_suno_c) from ttfgld902702 ;

using Concat() function the system take me the following error:

"lookup error - SQl Server database error: ‘CONCAT’ is not a recognized value of predefined function

(transated from italian language: “CONCAT non è un valore riconosciuto di funzione predefinita”).

I’ve get function from the Code Snippets tab in the “String Functions” group.

probably there’s some configuration steps to do, but I don’t found a solution.

I’m not yet able to do a join between strings also usine “+” connector.

I’ve a lot of experience in sql languages, also with Toad for Oracle, but I don’t understand where is the problem.

can someone help me?

thnks in advance, Pietro


#2

MSSQL does not support the CONCAT function. The CONCAT function is used in MySQL. You must use the + operator.

SELECT ‘BPF’ + t_suno_c as [FieldName] from ttfgld902702

If t_suno_c is not a string field you may have to convert

SELECT ‘BPF’ + convert(varchar,t_suno_c) as [FieldName] from ttfgld902702

Another trick is using FN to make CONCAT compatible with MSSQL. This method only allows 2 values be based in

SELECT {FN CONCAT(‘BPF’,t_suno_c)} as [FieldName] from ttfgld902702

Hope this helps!


Riverwood Healthcare Center

200 Bunker Hill Drive

Aitkin, MN, 56431

www.RiverwoodHealthcare.org

Wade D Zubke
IT Clinical Data and Report Analyst
ph: 218-429-3982
fax: (218) 927-5516
WZubke@riverwoodhealthcare.org

From: p.bellaver [mailto:bounce-pbellaver@toadworld.com]
Sent: Wednesday, November 20, 2013 9:25 PM
To: sqlserver@toadworld.com
Subject: [Toad World - SQL Server Discussion Forum] Toad for SQL Server

Toad for SQL Server

Thread created by p.bellaver

hello, I’ve still installed Toad for SQL Server, and executing the following select

select CONCAT(‘BPF’, t_suno_c) from ttfgld902702 ;

using Concat() function the system take me the following error:

"lookup error - SQl Server database error: ‘CONCAT’ is not a recognized value of predefined function

(transated from italian language: “CONCAT non è un valore riconosciuto di funzione predefinita”).

I’ve get function from the Code Snippets tab in the “String Functions” group.

probably there’s some configuration steps to do, but I don’t found a solution.

I’m not yet able to do a join between strings also usine “+” connector.

I’ve a lot of experience in sql languages, also with Toad for Oracle, but I don’t understand where is the problem.

can someone help me?

thnks in advance, Pietro

To reply, please reply-all to this email.

Stop receiving emails on this subject.
Or Unsubscribe from SQL Server notifications altogether.
Toad World - SQL Server Discussion Forum

Flag this post as spam/abuse.


#3

The function CONCAT is only in SQL Server 2012, maybe your instance that these connected is another version.