I have issues deleting data
I created the following using TSQL:
CREATE TABLE [dbo].[google] (
[ad] [varchar](255) NULL,
[ad_id] [varchar](30) NULL ) ON [PRIMARY]
CREATE TABLE [dbo].[gmap] (
[ad] [nvarchar](200) NULL,
[ad_id] [nvarchar](200) NULL) ON [PRIMARY]
create view [dbo].[v_google] as
select a.[ad], a.[ad_id]
from [dbo].[google] a
left join [dbo].[gmap] b on a.[ad_id] = b.[ad_id]
I inserted the data into the tables. When I tried to delete data with TSQL below:
from [dbo].[v_google] a
join [dbo].[google] b on a.[ad] = b.[ad]
where a.ad is null
I get error message:
Msg 245, Level 16, State 1, Line 45
Conversion failed when converting the nvarchar value '2.17E+16' to data type int.
Msg 248, Level 16, State 1, Line 45
The conversion of the nvarchar value '21700000001382594' overflowed an int column.
I've looked at the solutions regarding the error message but the TSQL used are too advance for me and didn't understand it, since I'm a new learner in SQL SERVER.