473,851 Members | 2,181 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Syntax error converting the varchar value '10.136.20.20' to a column of data type int.

I have an inventory database that Im trying to create a report out of
the IP address are a lookup on a seperat table but I keep getting the
above error can I change the table row to something to fix this or
what.

SELECT i.INVENTORY_ITE M_ID AS [IP Address],i.HOST_NAME AS [Server
Name], '' AS Flag, i.MEMO AS Comments, 'Seattle' AS City, 'Washington'
AS State,
CASE WHEN fv.value = 'EL EET1410' THEN '1111 3rd
Ave.' WHEN fv.value = 'EL WFL17' THEN '999 3rd Ave.' ELSE '' END AS
[Address 1],
' ' AS [Address 2], CASE WHEN fv.value = 'EL
EET1410' THEN '1111' WHEN fv.value = 'EL WFL17' THEN '2222' ELSE ''
END AS [Building ID],
fv.VALUE AS Building, '98101' AS Zip,
CASE WHEN fv.value = 'EL EET1410' THEN '14' WHEN
fv.value = 'EL WFL17' THEN '17' ELSE '' END AS [Computing Facility
Level],
CASE WHEN fv.value = 'EL EET1410' THEN '14' WHEN
fv.value = 'EL WFL17' THEN '17' ELSE '' END AS [Bldg Floor],
CASE WHEN fv.value = 'EL EET1410' THEN 'C028'
WHEN fv.value = 'EL WFL17' THEN 'C123' ELSE '' END AS WSPID,
i.LOCATION_IN_F ACILITY AS Location,
i.SERIAL_NUMBER AS [Serial Number], i.ASSET_TAG AS [Asset Tag], ' ' AS
[Second Asset Tag(s)],
vv.VALUE AS Manufacture, mv.VALUE AS Model,
'Yes' AS [Rack Mountable], rv.VALUE AS [Rack Units], 'DEV' AS [Server
Enviroment],
lv.VALUE AS [Sever Type], ov.VALUE AS OS,
CASE WHEN lv.value = 'Server - Intel Blade' THEN
'Windows' WHEN lv.value = 'Server - Intel' THEN 'Windows' WHEN
lv.value = 'Server - Unix' THEN 'Unix'
ELSE '' END AS [OS Type], '19x28' AS Footprint,
ev.VALUE AS [Technical Owner of Server], 'N/A' AS [SLA Category],
i.ON_BOARD_NIC_ PORT_COUNT AS [NW Connection
quantity], 'Devlopment/Test Machine' AS [Application(s) Name],
ev.VALUE AS [PW Contact],
'N/A' AS RTO, 'N/A' AS RPO, 'No' AS [Is Box
Clustered?], 'N/A' AS [Buisness Critical],
CASE WHEN mv.value = 'Proliant DL580G1' THEN
'90lbs' WHEN mv.value = 'Proliant DL360G2' THEN '85lbs' WHEN mv.value
= 'Enterprise 220R' THEN
'45lbs' ELSE '' END AS Weight,
i.LAST_MODIFIED _DATE AS [Date of Last Install], 'No' AS [Dedicated
Circuit]
FROM dbo.INVENTORY_I TEM i LEFT OUTER JOIN
dbo.IP_TO_INVEN TORY pv ON pv.IP_ADDRESS = i.INVENTORY_ITE M_ID
LEFT OUTER JOIN
dbo.LOOKUP_VALU E lv ON lv.LOOKUP_VALUE _ID =
i.DEVICE_TYPE_I D LEFT OUTER JOIN
dbo.LOOKUP_VALU E fv ON fv.LOOKUP_VALUE _ID =
i.FACILITY_ID LEFT OUTER JOIN
dbo.LOOKUP_VALU E vv ON vv.LOOKUP_VALUE _ID =
i.VENDOR_ID LEFT OUTER JOIN
dbo.LOOKUP_VALU E mv ON mv.LOOKUP_VALUE _ID =
i.MODEL_ID LEFT OUTER JOIN
dbo.LOOKUP_VALU E ov ON ov.LOOKUP_VALUE _ID =
i.SOFTWARE_VERS ION_ID LEFT OUTER JOIN
dbo.LOOKUP_VALU E ev ON ev.LOOKUP_VALUE _ID =
i.CHECKED_OUT_B Y_ID LEFT OUTER JOIN
dbo.LOOKUP_VALU E rv ON rv.LOOKUP_VALUE _ID =
i.U_HEIGHT_ID
Jul 20 '05 #1
2 7145
Hi

You don't post the ddl for the tables used but at a guess either
pv.IP_ADDRESS or i.INVENTORY_ITE M_ID is an it.

John

"Anthony" <an************ **@wamu.net> wrote in message
news:fb******** *************** ***@posting.goo gle.com...
I have an inventory database that Im trying to create a report out of
the IP address are a lookup on a seperat table but I keep getting the
above error can I change the table row to something to fix this or
what.

SELECT i.INVENTORY_ITE M_ID AS [IP Address],i.HOST_NAME AS [Server
Name], '' AS Flag, i.MEMO AS Comments, 'Seattle' AS City, 'Washington'
AS State,
CASE WHEN fv.value = 'EL EET1410' THEN '1111 3rd
Ave.' WHEN fv.value = 'EL WFL17' THEN '999 3rd Ave.' ELSE '' END AS
[Address 1],
' ' AS [Address 2], CASE WHEN fv.value = 'EL
EET1410' THEN '1111' WHEN fv.value = 'EL WFL17' THEN '2222' ELSE ''
END AS [Building ID],
fv.VALUE AS Building, '98101' AS Zip,
CASE WHEN fv.value = 'EL EET1410' THEN '14' WHEN
fv.value = 'EL WFL17' THEN '17' ELSE '' END AS [Computing Facility
Level],
CASE WHEN fv.value = 'EL EET1410' THEN '14' WHEN
fv.value = 'EL WFL17' THEN '17' ELSE '' END AS [Bldg Floor],
CASE WHEN fv.value = 'EL EET1410' THEN 'C028'
WHEN fv.value = 'EL WFL17' THEN 'C123' ELSE '' END AS WSPID,
i.LOCATION_IN_F ACILITY AS Location,
i.SERIAL_NUMBER AS [Serial Number], i.ASSET_TAG AS [Asset Tag], ' ' AS
[Second Asset Tag(s)],
vv.VALUE AS Manufacture, mv.VALUE AS Model,
'Yes' AS [Rack Mountable], rv.VALUE AS [Rack Units], 'DEV' AS [Server
Enviroment],
lv.VALUE AS [Sever Type], ov.VALUE AS OS,
CASE WHEN lv.value = 'Server - Intel Blade' THEN
'Windows' WHEN lv.value = 'Server - Intel' THEN 'Windows' WHEN
lv.value = 'Server - Unix' THEN 'Unix'
ELSE '' END AS [OS Type], '19x28' AS Footprint,
ev.VALUE AS [Technical Owner of Server], 'N/A' AS [SLA Category],
i.ON_BOARD_NIC_ PORT_COUNT AS [NW Connection
quantity], 'Devlopment/Test Machine' AS [Application(s) Name],
ev.VALUE AS [PW Contact],
'N/A' AS RTO, 'N/A' AS RPO, 'No' AS [Is Box
Clustered?], 'N/A' AS [Buisness Critical],
CASE WHEN mv.value = 'Proliant DL580G1' THEN
'90lbs' WHEN mv.value = 'Proliant DL360G2' THEN '85lbs' WHEN mv.value
= 'Enterprise 220R' THEN
'45lbs' ELSE '' END AS Weight,
i.LAST_MODIFIED _DATE AS [Date of Last Install], 'No' AS [Dedicated
Circuit]
FROM dbo.INVENTORY_I TEM i LEFT OUTER JOIN
dbo.IP_TO_INVEN TORY pv ON pv.IP_ADDRESS = i.INVENTORY_ITE M_ID
LEFT OUTER JOIN
dbo.LOOKUP_VALU E lv ON lv.LOOKUP_VALUE _ID =
i.DEVICE_TYPE_I D LEFT OUTER JOIN
dbo.LOOKUP_VALU E fv ON fv.LOOKUP_VALUE _ID =
i.FACILITY_ID LEFT OUTER JOIN
dbo.LOOKUP_VALU E vv ON vv.LOOKUP_VALUE _ID =
i.VENDOR_ID LEFT OUTER JOIN
dbo.LOOKUP_VALU E mv ON mv.LOOKUP_VALUE _ID =
i.MODEL_ID LEFT OUTER JOIN
dbo.LOOKUP_VALU E ov ON ov.LOOKUP_VALUE _ID =
i.SOFTWARE_VERS ION_ID LEFT OUTER JOIN
dbo.LOOKUP_VALU E ev ON ev.LOOKUP_VALUE _ID =
i.CHECKED_OUT_B Y_ID LEFT OUTER JOIN
dbo.LOOKUP_VALU E rv ON rv.LOOKUP_VALUE _ID =
i.U_HEIGHT_ID

Jul 20 '05 #2
sa************* **@wamu.net (Anthony) wrote in message news:<fb******* *************** ****@posting.go ogle.com>...
I have an inventory database that Im trying to create a report out of
the IP address are a lookup on a seperat table but I keep getting the
above error can I change the table row to something to fix this or
what.

I believe you will find the datatype of one of the following to be an
integer, not a string.
dbo.INVENTORY_I TEM.INVENTORY_I TEM_ID
or
dbo.IP_TO_IVNET ORY.IP_ADDRESS

FROM dbo.INVENTORY_I TEM i

LEFT OUTER JOIN dbo.IP_TO_INVEN TORY pv
ON pv.IP_ADDRESS = i.INVENTORY_ITE M_ID
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2866
by: Toonman | last post by:
I'm trying to use a couple of variables in a stored procedure. Things work fine when I hard code the data into the variables and also work fine when I use the variable in the WHERE clause and hard code data for the other variable. So, I think I have a syntax problem when trying to use "FrontPage.@FrontpageProduct" as seen in my example code below. I've tried many variations... and either get syntax errors or end up with a result of "no...
2
3331
by: Anthony | last post by:
I have an inventory database that Im trying to create a report out of the IP address are a lookup on a seperat table but I keep getting the above error can I change the table row to something to fix this or what. SELECT i.INVENTORY_ITEM_ID AS ,i.HOST_NAME AS , '' AS Flag, i.MEMO AS Comments, 'Seattle' AS City, 'Washington' AS State, CASE WHEN fv.value = 'EL EET1410' THEN '1111 3rd Ave.' WHEN fv.value = 'EL WFL17' THEN '999 3rd Ave.'...
4
1621
by: Viktor Popov | last post by:
Hi, I'm trying to execute stored procedure and I collect its parameters from WebForm. There is an error: Error converting data type varchar to int. What could be the problem? Here it is the code: private void Button2_Click(object sender, System.EventArgs e) {
1
9875
by: luna | last post by:
got so far then it broke and i cant get it working again - it was updating fine but not inserting and now im getting a "Error converting data type varchar to numeric" which i didnt have before.... stored procedure is CREATE Procedure newupdate @newid varchar(50), @newnews varchar(50)
7
2210
by: Dan | last post by:
Hi. I'm having a problem with searching a databse entry. I'm new to dotnet and still trying to figure some things out. In order to locate a row in an access databse file .mdb, i am using this call Dim dr As DataRow dr = Me.DsMaster.Tables("MasterList").Rows.Find(Me.txtScan.Text) where me.txtscan.text is a value from 2 to 9323493000236.
1
2437
by: ronca | last post by:
Error Syntax error converting the varchar value $568.25 to a column of data type Statement I'm using Select Top 1000 * From mass.dbo.dbo_MASS where _amount > 5000 Want only row with _amount >5000 Help please
3
2682
by: othellomy | last post by:
select convert(float,'1.2334e+006') 1233400.0 select convert(decimal(20,2),'1.2334e+006') Server: Msg 8114, Level 16, State 5, Line 1 Error converting data type varchar to numeric. can I set some options arithabort etc to have a workaround to this problem? Thanks.
0
1746
Krishna Ladwa
by: Krishna Ladwa | last post by:
In Sql Server 2000 Version, I found that no Notification message box appears when converting text column to varchar but the data gets truncated to the given size for the varchar. Whereas it appears when you convert the varchar column to text column. Do this through Enterprise Manager Console Create a New table with a column as varchar datatype from Enterprise Manager  table created  Open the table and add one row  Successfully added the...
10
2943
by: Rahul Babbar | last post by:
Hi, I am getting the following error, while executing the simple insert script on a few tables. INSERT INTO <table_name>(<col1>) VALUES (1); DB2 SQL error: SQLCODE: -440, SQLSTATE: 42884, SQLERRMC: =;FUNCTION Message: No authorized routine named "=" of type "FUNCTION" having compatible arguments was found.
0
9748
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11020
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10670
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10735
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7907
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5736
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5934
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4549
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4143
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.