Saturday, July 4, 2020

How to insert a string value into column with an single quote (apostrophe )

While tried to insert string value having single quote (apostrophe) character in sql server, it will not allow you to insert. it will throw error below.

Please follow below steps to resolve the issue.

Step 1: Create table with two columns

USE tempdb
GO
CREATE TABLE single_quote
(
  [ID] INT,
  [Name] VARCHAR(50)
)
GO

Step 2: Try to insert string with single quote value

INSERT INTO single_quote VALUES (1,'o'reilly books')
GO

Msg 102, Level 15, State 1, Line 10
Incorrect syntax near 'reilly'.
Msg 105, Level 15, State 1, Line 10
Unclosed quotation mark after the character string ')
GO
'.

Step 3: Replace Single quote with double single quote

INSERT INTO single_quote VALUES (1,'o''reilly books')
GO

Step 4: Check the value

select * from single_quote

ID Name
1 o'reilly books

Now you can see the value got inserted correctly.

Watch the Video Here:


Monday, March 23, 2020

Step by Step Power BI installation Report Server and Power BI Desktop

Power BI Desktop can be installed stand alone. But it may or may not support deployment of Power BI reports to report server.
So it required to install correctly.
We need to follow below steps for the Power BI installation

1. Power BI Report Server Installation
2. Configure Power BI report Server.
3. Install Power BI Desktop.

Now check the below videos which explains the installation process step by step.

1. Power BI Report Server Installation


2. Configure Power BI report Server.


3. Install Power BI Desktop.