I am importing Data from excel-sheet to our sql server which comes from another system. Example In our sql server database Client name is Zee Entertainment Limited but in Another System Client Name is Zee Ent. ltd. or any other name format. In this way there are 10 thousands of records which is having data variations and We can not change our data which is connected to another business.
Kindly give me solution.
Create a mapping table that maps the company name from the 2 source systems to your system.
This will work but is a solution fraught with disaster, presumably there is no control of the source systems input (excel as a data source ) so whenever a user miss types a company name your mapping goes into the garbage.
Never underestimate the power of human stupidity
I'm having some problems getting an update running. I have done similar updates some times without problems (MySql instead of MariaDB). Maybe I'm too tired today to see the problem, it was a long working day...
Maybe someone can illuminate me
SET Idx=(SELECTCOALESCE(MAX(tbl.Idx), 0)+1 FROM (SELECT * FROM test) tbl WHERE tbl.Grp=1)
SET Idx=(SELECTCOALESCE(MAX(tbl.Idx), 0)+1 FROM (SELECT * FROM test WHERE Grp=1) tbl)
UPDATE test t, (SELECT * FROM test WHERE Grp=1) tbl
SET t.Idx= (SELECTCOALESCE(MAX(tbl.Idx), 0)+1)
The first update command produces even a null result on the MAX() function. Strange...
yes, normally I would use Select Idx, but on samples I use the most simplified syntax.
The bad news is that the first two examples work on MySql but not on MariaDB. The third syntax doesn't work on any DBMS, but I never used it and got it yesterday from the internet because I was desperated.
I always thought that MariaDB is fully compatible to MySql, but this is unfortunatelly not true. Really bad news for those who migrated a productive system from MySql to MariaDB and are using systax like that
I have a Oracle DB in which all the information is stored and this information is been consumed by different teams and below is the two options i have to decide on :
1. Write a Stored procedure and give the stored procedure to the respective teams and they can call the stored procedure.
2. Write a stored procedure wrap it as an API and expose the API, different team will call the API exposed and API will in turn hit the SP and return the response to the team.
Like to know what is the PRON and CRONS with these options and what is the best possible solution to go with.
We are working on separate computers in different locations so we are not connected to a network.
We are using SQL Server 2016 Express to develop a C# application in Visual Studio (college project).
My group mate sent me the (.bak) and (.mdf) files of the database he was working on so I can view it and make the necessary updates. I saw the data in the files after restoring and attaching them respectively. Some columns that were in (.bak)file were not in the (.mdf) file, and I need the (.mdf) file to be updated/contain the same data with the .bak file so I can add a datasource to the application for easy retrieval of data.