My Assistant
![]() ![]() |
|
|
Apr 17 2012, 12:24 PM
Post
#1
|
|
|
UtterAccess Ruler Posts: 1,122 From: Mississippi USA |
I have two fields, one is an integer and the other is a nchar(10). I need to take what is in the int field and append it to the nchar field. How would I go baout doing that. Here is a sample of the data I am looking to join up.
nchar Int new nchar 1-52- 3 1-52-3 1-126- 1 1-126-1 1-78- 79 1-78-79 Thanks for any assistance that can be provided. |
|
|
|
Apr 17 2012, 01:33 PM
Post
#2
|
|
|
UtterAccess Editor Posts: 15,970 From: Northern Virginia, USA |
You can use the CAST() T-SQL function to cast your int into an nchar ...
SELECT f1, f2, f1 + CAST(f3 AS nchar) As newNChar FROM someTable |
|
|
|
Apr 17 2012, 02:22 PM
Post
#3
|
|
|
UtterAccess Ruler Posts: 1,122 From: Mississippi USA |
I created a new field fo type varchar and Casted the fields that way. Thanks for the assistance.
This post has been edited by cdavidsn: Apr 17 2012, 02:22 PM |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 21st May 2013 - 01:06 PM |