SQL ERROR of "CONCAT is not a recognized built-in function name in SQL"

Normally the function of "CONCAT( )" is used in SQL to combine two strings together. 
In SAP B1, however, you get the error message in the Subject line above when you try to use it and there is not much help there as to what to do.  The solution is so simple you are going to fall over. I have had so many questions about this one function and several folks have asked me to post this, as they spent hours going through various permutations with no success. 
If you have had experience with some other SQL than what is in SAP B1, the following puts the city name and state name from the CRD1 table into one string in the final results:
<b>CONCAT(T0.City, '  ', T0.State) AS ‘Combined City and State’,</b>
BUT in SAP B1, the above will error out...so what do you do?
Get down to the real basics and use the plus sign.  Go ahead, try it:
<b>(T0.City + ' ' + T0.State) AS 'Combined City and State',</b>
Note that the single quotation marks have a space between them to give you space between the city name and the state name...you could put a comma and a space between the single quotation marks, if you want to.
Can you believe what a simple solution that is? I have pages full of this stuff from where the SQL gives you a message and no resolution...
OK - Huy, Krisha, John, and Charles - I have no idea if it will help anyone or not, but I promised you I would post...so there it is...pass it on to your compatriots!
Thanks all - Zal

OK Suda - maybe I was not too clear...sorry.  Now to your points...
WHY:
"CONCAT ( )" is a very common operation command in other SQL I have used and studied. Most folks having experience in SQL would think this is a "standard" operative.  When folks are new to SAP B1 and they try to use "CONCAT ( )", they get the error message as shown in the Subject line.
WHERE YOU GET MESSAGE:
You get the error message in the Query Window where you type in/change SQL  and after you have executed the query.  Error messages appear at the very bottom of the Query Window in red.  The words in the Subject line are part of an exact copy from that line.
APPLYING THE QUERY:
When I hold instruction on SQL, I give exercises for folks to do.  This was nothing more than part of an exercise to demonstrate how one can combine two fields in one column in a query and how it comes out on a report (we combine other fields in the same "address" exercise to create "labels" using the Print Layout Designer).  I know, nothing very earth shattering, but each training script I create has ONE specific objective since the scripts I write are for users and some might have experience from other packages.
WITH OR WITHOUT PARENTHESIS:
Thanks - yes, it also works without parenthesis.
But when someone is new to SQL, the lengthy "one-liner" created by the SAP B1 Query Generator can be a bit difficult to read so I have developed a writing and format standard to make reading the SQL easier by breaking it up. The format standard also makes it easier to draw attention to one particular line on an overhead and for the student to write comments or notes on the page.  But one writing standard is that the students use parenthesis after a particular command [for example, SUM( ), MIN ( ), MAX( ), AVG( ), etc].  It might be seen as useless for experienced persons, but I have found that folks can "get it" better when you give them small rules like this one.  If you want to see a bit more of that standard, there is another item (titled Reconciliation by a person named Shwu?) somewhere on the forum where I laid out an entire SQL for pre-upgrade reconciliation.  I tend to document A LOT since I am writing SQL for several clients and sometimes refer back to old ones.  The standard might be funky, and maybe someone else has a better way, but heck - it works for me!
Thanks for pointing out where I was a bit confusing in the original message.  I don't know how these Reward Points work, but consider yourself getting a "Z" point for those "S" points in your message.
Take care - Zal

Similar Messages

  • SSMS 2012: Import XML File to SQL Table - 'value' is not a recognized built-in function name!!??

    Hi all,
    I have the following xml file (books1.xml):
    <bookstore>
    <book>
    <BookID>1</BookID>
    <title>Everyday Italian</title>
    <author>Giada De Laurentiis</author>
    <year>2005</year>
    <price>30.00</price>
    </book>
    <book>
    <BookID>2<BookID>
    <title>Harry Potter</title>
    <author>J K. Rowling</author>
    <year>2005</year>
    <price>29.99</price>
    </book>
    <book>
    <BookID>3<BookID>
    <title>XQuery Kick Start</title>
    <author>James McGovern</author>
    <year>2003</year>
    <price>49.99</price>
    </book>
    <book>
    <BookID>4<BookID>
    <title>Learning XML</title>
    <author>Erik T. Ray</author>
    <year>2003</year>
    <price>39.95</price>
    </book>
    </bookstore>
    In my Microsoft SQL Server 2012 Management Studio, I executed the following SQL Query code:
    --XQuery w3schools example using books1.xml in C:\Temp folder
    ---SQL Query W3books Title
    ---9 March 2015
    USE XML_XQUERY
    GO
    CREATE TABLE W3Books(
    BookID INt Primary Key,
    Title VARCHAR(30));
    INSERT INTO W3Books (BookID, Title)
    SELECT x.book.query('BookID'), value('.', 'INT'),
    x.book.query('title'), value('.', 'VARCHAR(30)')
    FROM (
    SELECT CAST(x AS XML)
    FROM OPENROWSET(
    BULK 'C:\Temp\books1.xml',
    SINGLE_BLOB) AS T(x)
    ) AS T(x)
    CROSS APPLY x.nodes('W3Books/book') AS x(book);
    SELECT BookID, Title
    FROM W3Books;
    I got the following error messages:
    Msg 195, Level 15, State 10, Line 7
    'value' is not a recognized built-in function name.
    Msg 156, Level 15, State 1, Line 16
    Incorrect syntax near the keyword 'AS'.
    I don't know why I got the error of 'value' is not a recognized built-in function name. Please kindly help and tell me what is wrong in my code and how to correct the error.
    Thanks, Scott Chang
    P. S.
    (1) I mimicked the xml file and SQL Qeury code of Import XML File to SQL Table in
    http://pratchev.blogspot.com/2008/11/import-xml-file-to-sql-table.html. The xml file and the code of this sample worked in my SSMS 2012 program.
    (2) I am learning the "CAST" and "CROSS APPLY" in the Create Instances of XML Data of Microsoft MSDN - it is very abstract to me.

    Hi Stan210, Thanks for your nice response.
    I corrected my xml file as you pointed out.
    I made some changes in some code statements of my SQLQueryW3BookTitle.sql as you instructed:
    --XQuery w3schools example using books1.xml in C:\Temp folder
    ---SQL Query W3books Title
    ---10 March 2015
    USE XML_XQUERY
    GO
    CREATE TABLE W3Books(
    BookID INt Primary Key,
    Title VARCHAR(30));
    INSERT INTO W3Books (BookID, Title)
    SELECT x.book.value('/BookID[1]', 'INT'),
    x.book.value('/title[1]', 'VARCHAR(30)')
    FROM (
    SELECT CAST(x AS XML)
    FROM OPENROWSET(
    BULK 'C:\Temp\books1.xml',SINGLE_BLOB) AS T(x)
    ) AS T(x)
    CROSS APPLY x.nodes('bookstore/book') AS x(book);
    SELECT BookID, Title
    FROM W3Books;
    I executed my revised sql and I got the following Message and Results:
    Msg 515, Level 16, State 2, Line 6
    Cannot insert the value NULL into column 'BookID', table 'XML_XQUERY.dbo.W3Books'; column does not allow nulls. INSERT fails.
    The statement has been terminated.
    (0 row(s) affected)
    Results:
    BookID    Title
    I don't know why I just got the names of columns in Results and the "Cannot insert the value NULL into column 'BookID', table 'XML_XQUERY.dbo.W3Books'; column does not allow nulls, insert fails." in Messages.  Please kindly help, advise me
    how to correct the errors and respond again.
    Many Thanks again,
    Scott Chang

  • Error 'DAYOFWEEK' is not a recognized built-in function name.

    hi friend I used the following query with sql server 2008 to select group by records
    SELECT
    sum(ljoin) as lct,
    sum(rjoin) as rct,
    CONCAT(DATE_FORMAT(DATE_ADD(date, INTERVAL(1-DAYOFWEEK(date)) DAY),'%Y-%m-%e'), ' TO ',
    DATE_FORMAT(DATE_ADD(date, INTERVAL(7-DAYOFWEEK(date)) DAY),'%Y-%m-%e')) AS DateRange
    FROM Pairs_Details
    WHERE userid='jitu'
    GROUP BY YEARWEEK(date)
    it return the  following error 'DAYOFWEEK' is not a recognized built-in function name.
    But I can not get my desire result there are my following table, data and desire output which I want
    Pairs_Details table definition:
    CREATE TABLE [dbo].[Pairs_Details](
    [sno] [int] IDENTITY(1,1) NOT NULL,
    [userid] [nvarchar](50) NULL,
    [date] [datetime] NULL,
    [ljoin] [int] NULL,
    [rjoin] [int] NULL
    ) ON [PRIMARY]
    Example data:
    sno userid date ljoin rjoin
    1 jitu 2014-01-21 15:48:24.000 1 NULL
    2 jitu 2014-01-22 15:48:24.000 NULL 1
    3 tetu1234 2014-01-22 15:48:24.000 1 NULL
    4 jitu 2014-01-24 15:48:24.000 NULL 1
    5 saurbh123 2014-01-25 15:48:24.000 1 NULL
    6 jitu 2014-01-26 15:48:24.000 1 NULL
    7 tetu1234 2014-01-28 16:40:05.000 NULL 1
    8 jitu 2014-01-28 16:40:05.000 NULL 1
    Desired output: for perticular userid 'jitu'
    userid | ljoin | rjoin | DATERANGE |
    jitu | 2 | 2 | 2014-01-21 15:48:24.00 TO 2014-01-27 16:40:05.000 |
    please any can help me.
    thanks.
    Jitendra Kumar Sr. Software Developer at Ruvixo Technologies 7895253402

    Try below code..
    SET DATEFIRST 2;
    ;WITH CTE AS
    SELECT * , DATEPART(WW, [date]) AS week_num
    FROM pairs_details
    SELECT userid, SUM(ISNULL(ljoin,0)) as ljoin, SUM(ISNULL(rjoin,0)) as rjoin
    FROM CTE b
    GROUP BY userid, week_num
    still missing date_range concatenated field.. I will get back to it... Meanwhile you can use this..
    Please mark as answer, if this has helped you resolving the issue.
    Good Luck :) .. Visit www.sqlsaga.com for more t-sql code snippets and BI related how to articles.

  • [SQL Server]'TO_DATE' is not a recognized built-in function name

    Running 11g dg4msq and getting the error :
    SQL> select * from all_users@dg4msql;
    select * from all_users@dg4msql
    ERROR at line 1:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Oracle][ODBC SQL Server Driver][SQL Server]'TO_DATE' is not a recognized
    built-in function name. {10196,NativeErr = 195}

    Hi,
    This problem happened on Windows platforms after upgrading the RDBMS used to access the gateway from 10.2.0.3 to 10.2.0.4 patch 22.
    The solution is to install and apply Oracle Database 10.2.0.4 Patch 29 (Windows Bundle Patch 29) or later to the RDBMS that is running the query and connecting to the Gateway.
    This is detailed in the following note available on My Oracle Support -
    Query Using DG4MSQL Returns Error After Upgrade of RDBMS From 10.2.0.3 to 10.2.0.4 (Doc ID 1078940.1)
    Regards,
    Mike

  • 'SUBSTRING_INDEX' is not a recognized built-in function name.

    actually iam modifing the servlet code to connect with MSSQL.previously it was MYSQL.now compiling is ok.
    while running it shows error at the top of the linked page as...
    error
    [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]'SUBSTRING_INDEX' is not a recognized built-in function name.
    ->can any one give me the solution for this error.

    Don't use that function because it doesn't exist in SQL-Server.
    OR
    Change your SQL to use a function that does exist.
    OR
    Create a user defined function in SQL server that has that name.

  • TRY_CAST is not a recognised built in function name

    see image: http://i.imgur.com/rf1t5FN.png
    Intellisense is not recognising try cast as a function - how can I resolve?

    Thanks it appears they are aware of the bug but no plans to fix it
    Hi ,
    For submitting a feedback to Microsoft such issues, I would recommend to submit it to the Microsoft Connect at this link https://connect.microsoft.com/SQLServer/Feedback. This connect site will serve as a connecting point between you and Microsoft, and ultimately
    the large community for you and Microsoft to interact with. Your feedback enables Microsoft to offer the best software and deliver superior services, meanwhile you can learn more about and contribute to the exciting projects on Microsoft Connect.
    Thanks,
    Sofiya Li
    TechNet Community Support

  • Error message: iTunes could not back up the iPod "iPod name" because an error occurred

    Every time I try to back up my iPod I get this error message: iTunes could not back up the iPod "iPod name" because an error occurred. How do you fix it?

    Try moving the existing backup file to a safe location and then try again. The backup file is located:
    Mac: ~/Library/Application Support/MobileSync/Backup/
    Windows XP: \Documents and Settings\(username)\Application Data\Apple Computer\MobileSync\Backup\
    Windows Vista and Windows 7: \Users\(username)\AppData\Roaming\Apple Computer\MobileSync\Backup\

  • How to find built-in functions for PL/SQL

    Hi everyone,
    Please can someone help me, I am running version 8i, and I am trying to find out how I can access all the built-in functions for PL/SQL.
    I am new in ORACLE environment and I just want to know all the built-in functions and their usage.
    Thanks
    Maikiki1
    null

    Use the 'Documentation' selection on the left side of the OTN page.
    All of the documentation for Oracle is available.
    You can also purchase the documentation CD-ROM from the Oracle Store.
    The functions are explained in the SQL reference manual.
    null

  • Sales Agreement workflow errored on 3205: is not a valid role or user name.

    Hi experts,
    We're currently on EBS R12.1.2 We're running into an issue that seems like a very general issue that other businesses would have encountered before. We have a business user who creates most of sales agreements. When this business user left the company, we set active end date on the particular userid. Now, when we go into these sales agreements originally created by this particular userid, and put in the expiration date to expire these sales agreement. We're seeing the sales agreement workflow erroring out in the pre-notification workflow email with error 3205: is not a valid role or user name.
    It seems to be this is a very typical business scenario. If you have encountered this problem, please share how you resolved this issue within your oracle apps environment.
    Thank you in advance for your help,
    Jennifer

    Hello,
    We have the same problem in 11.5.10.2. If we want use this blanket sales agreement I have to skipped this notification by sysadmin and after this I can extend end date and another user can use this BSA.
    Look at Extend The Expiration Date For Closed Non-Active Expired BSA Blanket Sales Agreement [ID 1394888.1]     
    Regards,
    Luko

  • Need a function name for Sql and Oracle

    Retrieving value of next line by doing opteration in previous row.

    Can you rephrase the question? Or better yet, provide an example? I'm not sure I understand what you are asking.
    My best guess is that you are looking for the analytic functions LEAD or LAG in Oracle, assuming you are on a relatively recent Oracle version. If by "SQL and Oracle" in your subject you mean "SQL Server and Oracle" (SQL is a language that all relational databases implement, SQL Server is Microsoft's relational database), I have no idea how (or if) you can do something similar with a built-in function in SQL Server. You would want to post in a SQL Server group to see how they handle that sort of thing.
    Justin

  • Not able to use a function inside a sql in a form, Why ??

    Here SERIAL_NUM is a function, this sql work fine in TOAD and SQLPLUS but inside the form iam getting error saying "function serial_num cannot be used in a sql" Why is it like that ?? Is there anyother way to execute this sql ?
    cursor c1 is
    SELECT msn.ATTRIBUTE7 Order_No,
    SERIAL_NUM(i.SERIAL_NUMBER) Serial_No,
    msn.ATTRIBUTE5 Firmware,
    msn.ATTRIBUTE15 Site_Pref
    FROM atrd.INSTALLER_INFO i,
    mtl_serial_numbers msn
    where SERIAL_NUM(i.SERIAL_NUMBER)=msn.SERIAL_NUMBER

    Here is the process I did. My oim version is 9.1.0.2
    1) Created java program in IBM RAD and compiled it.
    2) Created jar file using jar -cvfm class-files command.
    3) Copied the jar file to javatasks folder.
    4) Tried to use this jar in adapter then got "Failed because null" and sometimes "Server could not load class" messages. most of the time i am getting "failed because null" message.
    Compiled using javac command also without using this tool and created still no luck....

  • Linq to SQL Error. The member 'Sel.UserClass.FBId' has no supported translation to SQL.

    I'm getting the above error while trying to do a really simple query..
    Dim data = From d In dc.Users Where d.FBId.Equals(userId)
    Here's the class..
    <Table> _
    Public Class UserClass
    <Column(IsDbGenerated:=True, IsPrimaryKey:=True)> _
    Public Property Id() As Integer
    Get
    Return m_Id
    End Get
    Set(value As Integer)
    m_Id = value
    End Set
    End Property
    Private m_Id As Integer
    Public Property FBId() As String
    Get
    Return m_FBId
    End Get
    Set(value As String)
    m_FBId = value
    End Set
    End Property
    Private m_FBId As String
    <Column> _
    Public Property UserName() As String
    Get
    Return m_UserName
    End Get
    Set(value As String)
    m_UserName = value
    End Set
    End Property
    Private m_UserName As String
    End Class
    Any ideas why ?

    Hello,
    I am not sure if this is a windows phone question. Maybe you can post thread on LINQ to SQL forum for support.
    https://social.msdn.microsoft.com/Forums/en-US/home?forum=linqtosql.
    To save your time, you can try to mark FBId property with Column attribute like Id property. This can help LINQ to SQL to know how to make mapping with those properties. Please try it.
    Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate
    the survey.

  • Getting Error "Pricing Procedure could not be determined" in CRM Functional

    Hi Experts,
        While creating Quotation for Products, am getting error message of  " Pricing Procedure could not be determined".
    Kindly reply, how 2 resolve this by steps-by-steps.
    Thanks..
    Edited by: poorav4293 on Aug 6, 2011 12:27 PM

    Hi,
    Go to SPRO-> IMG-> Basic Functions-> pricing. Here goto second node & select determine pricing procedure.
    Here check the combination....
    sales org-distribution channel-doc price-cust price-pricing procedure.
    Here see the corresponding pricing procedure which should be proper based on the condition types.
    Thanks!
    Aswith.

  • Error message: "iTunes could not sync contacts to the iPhone "name here" because an error occurred while sending data from the iPhone."

    Began when Apple replaced my HD on my iMac. I can backup without any problems but when it is time to sync, I get this error.

    I want to add that I deleted all the old back-ups and created a new back-up without any issues except sync problem.

  • Error: The structure must not be a value class. parameter name structure

     public struct Alert_Cue_Type
                public short Test_Mode;
                public short WXR_Aural_Alert_Requests;
    public struct AURAL_TYPE
                public Alert_Cue_Type Alert_Cue;
                public ushort Checkword;
                public ushort PacketId;
                public short pad;
                public ushort Payload_Size;
                public ushort WordId;
    char[] Buffer = new char[3200];
    Buffer=ReceiveData();
    AURAL_TYPE Alerts = new AURAL_TYPE();
    int AURAL_TYPE_Size = Marshal.SizeOf(Alerts);
    IntPtr ptr = Marshal.AllocHGlobal(AURAL_TYPE_Size);
    Marshal.Copy(Buffer, 6, ptr, AURAL_TYPE_Size);
    Marshal.PtrToStructure(ptr, Alerts);//Error as mentioned in title
     How to fix it?

    take a look at this solution please:
    http://stackoverflow.com/questions/1195685/argument-exception-error-type-question
    I think you need this modification based on the solution suggestion in the link:
    (AURAL_TYPE)Marshal.PtrToStructure(ptr, typeof(AURAL_TYPE));

Maybe you are looking for

  • 2012 MBA won't output to DVI TV

    I have a 2012 MBA that I'm trying to connect to an old LCD TV via a mini display port to HDMI cable that's then attached to an HDMI to DVI adaptor. The TV cannot find a signal from the MBA and doesn't appear in the MBA's display preferences. The odd

  • Ichat theater - no audio ?

    today i watched a movie using ichat theater. it is .avi and works on my laptop and it worked on the app, too. but when it started, i unplugged my headphones, and the audio stopped. then i closed it, and shared the file again. this time, the audio did

  • Coffee spill on laptop... oh my

    I spilled a mouthful of coffee on my mac book pro...  keyboard is not repsonding.  Took the pro to visit the "apple doctor" today... They said there is water damage and still liquid on the logic board...  It was not cleaned.  I was told it would be m

  • Customize anchor color in FF 32.0

    Hi. I used to be able to go into about:config and pull up brower.anchor_color to change the default anchor color in Firefox. The settings still show as "user set", but it is clearly not working. All colors appear as the default colors although about:

  • OPC/DSC/Kepware Server

    When I attempt to deploy my application, I receive "Deployment failed: The client process cannot communicate with the configuration server process....." I have DSC Run Time module on the target machine and I can read the OPC tags on the Kepware Quick