Tag: database

How to handle iOS emojis in sql server database?

When saving smiley-faces sent from iOS phone into sql server it changes the emoji to questionmarks like this ?? instead. this normal happy face 🙂 works fine to save in sql server db but some others dont. Anyone else done this before and maybe could help me out or put me in the right direction? […]

Stored Procedure for converting rows to columns in SQL Server

I’m looking for an efficient way of how to convert rows to columns in SQL Server. I tried in Toad for Oracle, but now I want it in SQL Server. This is my example: CID SENTENCE 1 Hello; Hi; 2 Why; What; The result should be like CID SENTENCE 1 Hello 1 Hi 2 Why […]

Can we use different storage engine in SQL Server

I MySql proving different types of storage engine like InnoDB etc. And every storage engine have different features then others. I want know if we have such a type of mechanism in SQL Server also? If yes then how can we use these engines in SQL Server? And it is possible that SQL Server will […]

SQL Server 2014 Database NDF file Lost – Filegroup offline

I have a database that has lost one of its .ndf files and have been unable to get at the data. The .ndf file in question was added last Thursday and placed in a temporary storage location by a colleague (d’oh!). There is no backup available from this database since prior to this .ndf being […]

How to store Excel sheet data in SQL Server database

I have a column that can accept only .xls sheet. And I want to know how how we can store from the uploaded file in SQL Server.

delete/update database partially for current year records

I have sql server database which extracts data from a operational sql server database tables and tailor it into three tables on a separate database called Reporting Database. This reporting database holds data of student results for each academic year and each unit/module. I have set-up a job which extract this data everyday from the […]

Insert and restore and search in combox?

Salam Alekom . I have comboBox filling it from database as SqlConnection con = new SqlConnection(strcon); con.Open(); SqlCommand scm = new SqlCommand(); scm.Connection = con; scm.CommandText = “select * from com”; SqlDataAdapter adpt = new SqlDataAdapter(scm); DataTable dt = new DataTable(); adpt.Fill(dt); comboBox1.DataSource = dt; comboBox1.DisplayMember = dt.Columns[“com_name”].ToString(); comboBox1.ValueMember = dt.Columns[“com_id”].ToString(); Where filling with all […]

Design database for 1 to 1 relationship when some columns are applicable only in certain cases

I have a users table which stores the details of two types of users namely students and teachers. There are 10 fields like username, password etc common to both students and teachers. There are no 1 to n relations in case of any data here. In case of students, I have to store twenty different […]

Update SQL table from XML

I have two different XML files, from which I have to update two SQL tables via a stored procedure. one is in the format <InvoiceNumber>17-I-36528</InvoiceNumber>, and works fine. The second file is in the format <field name=”ABCD” type=”String” identifier=”d167bea7-2ec6-498e-9a8a-3d0e6f37b6b3″ value=”EFGF” /> this file does not update the table. What am I doing wrong here? Thanks […]

Implementing Immutable Table in SQL Database with Always Up-To-Date View

I am building a ‘debuggable-as-possible’ distributed system. My ideal is to keep as much of the state of the system immutable so that, if there is an issue with a previous computation, the computation can be debugged inside the previous snapshot of the system’s state. Politically, there is currently some difficulty in taking a dependency […]

MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.