Even better, nvarchar :-)
"This e-mail is from Reed Exhibitions (Oriel House, 26 The Quadrant,
Richmond, Surrey, TW9 1DL, United Kingdom), a division of Reed Business,
Registered in England, Number 678540. It contains information which is
confidential and may also be privileged. It is for the exclusive use of the
intended recipient(s). If you are not the intended recipient(s) please note
that any form of distribution, copying or use of this communication or the
information in it is strictly prohibited and may be unlawful. If you have
received this communication in error please return it to the sender or call
our switchboard on +44 (0) 20 89107910. The opinions expressed within this
communication are not necessarily those expressed by Reed Exhibitions."
Visit our website at
http://www.reedexpo.com
-----Original Message-----
From: Adrian Lynch
To: database programming
Sent: Tue Sep 26 08:12:04 2006
Subject: RE: [CF-Database] String Concatenation
Try...
INSERT INTO
APPM8_WLCSponsors
(ClientID, SponsorText)
VALUES
(@LocationID, 'To stop alerts, text No to +' + CAST(@SMSCancel AS
VARCHAR(999)) + '.')
Make the cast to varchar big enough to handle the longest big int.
Adrian
-----Original Message-----
From:
database-bounces@list...
[mailto:
database-bounces@list...]On Behalf Of Lee Fortnam
Sent: 26 September 2006 07:51
To: 'database programming'
Subject: [CF-Database] String Concatenation
Morning All,
Simple one for you to start the morning.
I have a stored procedure where I am passing a var called @SMSCancel bigint
I need to pass this along with some other text into a nvarchar field, at the
moment I have the following in my SP:
-- insert the sponsor message
INSERT INTO
APPM8_WLCSponsors
(ClientID, SponsorText)
VALUES
(@LocationID, 'To stop alerts, text No to +' + @SMSCancel + '.')
But the insert is failing and causing the SP to stop processing. SponsorText
is big enough to handle the string being created, any ideas?
Have also tried the following but with no luck:
DECLARE @SponsorString nvarchar(100)
SET @SponsorString = (SELECT 'To stop alerts, text No to +' + @SMSCancel +
'.')
-- insert the sponsor message
INSERT INTO
APPM8_WLCSponsors
(ClientID, SponsorText)
VALUES
(@LocationID, @SponsorString)
Dare say it is something silly but I cannot see it having trawled through
the help files on SQL Sever
Thanks & Regards
Lee Fortnam
_______________________________________________
For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo
--
>- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<
_______________________________________________
For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo
--
CFDeveloper Sponsors:-
>- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<
opensubscriber is not affiliated with the authors of this message nor responsible for its content.