I should of removed all the chars that are not A-Z a-z 0-9 first. Well so far so good, much better than before. I was creating a card record with the billing and shipping address. Worked fine for 10 years. The users on the back end complained about it. Users with no programming experience complained that if they wanted to ship to a different address, they had to create a new card record and enter all the information again. So I split everything up into separate records, and recorded the ID's of each record in the order record. But a problem surfaced with duplicate records, in which I did a horrible job in checking for duplicates. So checking a card record was easy, but checking a address record became more complicated.
SQL Server should be able to convert a table to XML using a SELECT-query. Can you also provide the structure of the source-tables? You can use below query (with the correct table-name) to get it.
SELECT *
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'tableName'
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)
Hello, Yes, you are right. I am using an API. It is the namespace Microsoft.SqlServer.Dts.Pipeline.Wrapper See here: https://msdn.microsoft.com/en-us/library/microsoft.sqlserver.dts.pipeline.wrapper(v=sql.110).aspx[^] Especially the method SetComponentProperty: https://msdn.microsoft.com/en-us/library/microsoft.sqlserver.dts.pipeline.wrapper.cmanagedcomponentwrapperclass.setcomponentproperty(v=sql.110).aspx[^]
You are going to get better value out of an article than a forum post, there is even one from CP in these results[^]
Ambertje wrote:
help me to create such a User defined function
That is not how the site works, we help you to learn how to create the functions, there are other sites that will do the job for you.
Never underestimate the power of human stupidity RAH
Thanks for the quick reply ...i have tried but could not really succeed. i managed the following SELECT `sAdmNo`,`SBGROUP`,SUM(AVG) FROM (select sAdmNo,SBGroup, AVG From (select sAdmNo,SBGroup, AVG FROM marks Where SBGroup = 'GROUP I' LIMIT 3)AS T Where SBGroup = 'GROUP II' LIMIT 2)AS TT GROUP BY sAdmNo ...kindly elaborate on how i can add from both groups
This one will work assuming the product codes are always numeric:
DECLARE @INPUT NVARCHAR(MAX) = 'your product code with or without leading zeros goes here'
DECLARE @TMP_INPUT INT = CAST(@INPUT AS INT)
SELECT
CASE
WHEN LEN(CAST(@TMP_INPUT AS NVARCHAR)) < 7 THEN SUBSTRING(@INPUT, 1, 7)
ELSE CAST(@TMP_INPUT AS NVARCHAR)
END
Regards, Johan
My advice is free, and you may get what you paid for.
You have already posted this question in QA: How Do I Insert Only Recently Updated Row From Table1 To 2[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
No, my memory's not *that* good! :-O It just came up on a Google search for the error message.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer