473,417 Members | 1,331 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,417 software developers and data experts.

data type nvarchar and varchar are incopatible in the boolean and operator

I'm trying to convert a query from access to sql server


UPDATE [Shipments]
SET [Shipments].[TCM Route Id] = LTrim([sfpostal/zip code]) & 'to' & LTrim([st postal/zip code])
FROM [Shipments]
WHERE ((([Shipments].[Route Id]) Is Null Or ([Shipments].[Route Id]) Like Null));

this code works fine in access but will not run in sql server. I'm at a loss.
Mar 10 '10 #1

✓ answered by ck9663

To concatenate two strings, just use the add operator (+). So it should be

Expand|Select|Wrap|Line Numbers
  1.  
  2. LTrim([sfpostal/zip code]) + 'to' + LTrim([st postal/zip code])
  3.  
  4.  
Happy Coding!!!

~~ CK

1 2124
ck9663
2,878 Expert 2GB
To concatenate two strings, just use the add operator (+). So it should be

Expand|Select|Wrap|Line Numbers
  1.  
  2. LTrim([sfpostal/zip code]) + 'to' + LTrim([st postal/zip code])
  3.  
  4.  
Happy Coding!!!

~~ CK
Mar 10 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: MC | last post by:
I am writing a script to retrieve data records of MarinLif table. The problem is that i have a column MarinLif_Picture of type image so the insert is wrong in this way. How do i correct it? ...
1
by: Andrew Arace | last post by:
I scoured the groups for some hands on code to perform the menial task of exporting table data from an Access 2000 database to Oracle database (in this case, it was oracle 8i but i'm assuming this...
6
by: Jon Davis | last post by:
I like the drag-and-drop accessibility of dragging a table to a Web Forms designer and seeing a SqlDataAdapter automatically created for me.. being able to create a DataSet from that is fun and...
11
by: mesut demir | last post by:
Hi All, When I create fields (in files) I need assign a data type like char, varchar, money etc. I have some questions about the data types when you create fields in a file. What is the...
11
by: c676228 | last post by:
Hi everyone, I am just wodering in asp program, if there is anybody writing store procedure for inserting data into database since there are so many parameters need to be passed into store...
13
by: G | last post by:
Hello, Looking for opinions on a fairly simple task, new to ASP.net (C#) and want to make sure I do this as efficiently as possible. I have a web based form, and I need to run some SQL before...
1
by: Doc11 | last post by:
I'm trying to allow users insert data into a database using the form view. But when I click the insert button I get this error: Server Error in '/Customer Database' Application....
4
by: Danny | last post by:
Hi All, I have a varchar(255) column for storing text in english and in hebrew. It was a stupid mistake to set the data type to be varchar, because now I need to store text in german and...
6
by: =?Utf-8?B?R3JlZw==?= | last post by:
I've come across a few statements that conflict eachother and I'm wondering what is correct. I cam across a web-site (I do not remember the site right now), that explained each data type. For...
4
by: GabeM | last post by:
I am trying to insert records from one table to another using the WHILE construct, I have managed to move all of the data with the exception of one concatenated field. I can't figure out how to...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.