SQL Question: CONTINUED

View: New views
6 Messages — Rating Filter:   Alert me  

SQL Question: CONTINUED

by Robert Harrison-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

 Well, it's not so DUH after all. It's MS SQL Server 2000. The field
type is "ntext". It can be a very long field.

I've tried LEFT, SUBSTR, and MID, and it just keeps spitting at me.

Any more ideas anyone.


Robert B. Harrison
Director of Interactive Services, Ext. 205

155 East Main Street
Smithtown, NY 11787
P (631) 361-4400
F (631) 361-6400
http://www.linx.com
 
 
 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:25:2050
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/25
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:25
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.25
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Parent Message unknown RE: SQL Question: CONTINUED

by Cook, Scott :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You didn't try what I said?  convert(varchar(300),ntextfield)

-----Original Message-----
From: Robert Harrison [mailto:RobertH@...]
Sent: Wednesday, November 23, 2005 10:57 AM
To: NYCFUG
Subject: SQL Question: CONTINUED


 Well, it's not so DUH after all. It's MS SQL Server 2000. The field
type is "ntext". It can be a very long field.

I've tried LEFT, SUBSTR, and MID, and it just keeps spitting at me.

Any more ideas anyone.


Robert B. Harrison
Director of Interactive Services, Ext. 205

155 East Main Street
Smithtown, NY 11787
P (631) 361-4400
F (631) 361-6400
http://www.linx.com
 
 
 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Get help! RoboHelp
http://www.houseoffusion.com/banners/view.cfm?bannerid=58

Message: http://www.houseoffusion.com/lists.cfm/link=i:25:2051
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/25
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:25
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.25
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Parent Message unknown RE: SQL Question: CONTINUED

by Cook, Scott :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It's an older DB version so you might have to restrict to 255 chars

convert(varchar(255),ntextfield) or convert(char(255),ntextfield)

-----Original Message-----
From: Robert Harrison [mailto:RobertH@...]
Sent: Wednesday, November 23, 2005 10:57 AM
To: NYCFUG
Subject: SQL Question: CONTINUED


 Well, it's not so DUH after all. It's MS SQL Server 2000. The field
type is "ntext". It can be a very long field.

I've tried LEFT, SUBSTR, and MID, and it just keeps spitting at me.

Any more ideas anyone.


Robert B. Harrison
Director of Interactive Services, Ext. 205

155 East Main Street
Smithtown, NY 11787
P (631) 361-4400
F (631) 361-6400
http://www.linx.com
 
 
 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:25:2052
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/25
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:25
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.25
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Parent Message unknown RE: SQL Question: CONTINUED

by Cook, Scott :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Sorry for the barrage.  Just realized you said ntext (unicode, I think?)

you might need to use this or whatever the correct variable type is

convert(nchar(255),ntextfield) or convert(nvarchar(255),ntextfield)

check out your docs for the convert function, I think there's a table there which indicates what you can convert to what

-----Original Message-----
From: Robert Harrison [mailto:RobertH@...]
Sent: Wednesday, November 23, 2005 10:57 AM
To: NYCFUG
Subject: SQL Question: CONTINUED


 Well, it's not so DUH after all. It's MS SQL Server 2000. The field
type is "ntext". It can be a very long field.

I've tried LEFT, SUBSTR, and MID, and it just keeps spitting at me.

Any more ideas anyone.


Robert B. Harrison
Director of Interactive Services, Ext. 205

155 East Main Street
Smithtown, NY 11787
P (631) 361-4400
F (631) 361-6400
http://www.linx.com
 
 
 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Protect Your PC from viruses, hackers, spam and more. Buy PC-cillin with Easy Installation & Support
http://www.houseoffusion.com/banners/view.cfm?bannerid=61

Message: http://www.houseoffusion.com/lists.cfm/link=i:25:2053
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/25
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:25
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.25
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Parent Message unknown RE: SQL Question: CONTINUED

by Wolf, Yonah :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Robert,

 Hmmm.... If it is SQL 2K, why not use full-text indexing? Wouldn't that be more effective? I am using Sql 2K, and I have text fields longer than 255 characters, so I don't think it is a size limitation. I think it is a conversion issue - i.e. because NTEXT uses extended character sets not all string functions might be supported.

--Yonah


Yonah Wolf
Development Project Manager
United Jewish Communities
111 8th Ave, Suite 11E
New York, NY 10011
V: 212.284.6550 / F: 212.284.6819
E: yonah.wolf@... / W: http://www.ujc.org
Live Generously.?  It does a world of good.

-----Original Message-----
From: Cook, Scott [mailto:scott.cook@...]
Sent: Wednesday, November 23, 2005 11:05 AM
To: NYCFUG
Subject: RE: SQL Question: CONTINUED

It's an older DB version so you might have to restrict to 255 chars

convert(varchar(255),ntextfield) or convert(char(255),ntextfield)

-----Original Message-----
From: Robert Harrison [mailto:RobertH@...]
Sent: Wednesday, November 23, 2005 10:57 AM
To: NYCFUG
Subject: SQL Question: CONTINUED


 Well, it's not so DUH after all. It's MS SQL Server 2000. The field type is "ntext". It can be a very long field.

I've tried LEFT, SUBSTR, and MID, and it just keeps spitting at me.

Any more ideas anyone.


Robert B. Harrison
Director of Interactive Services, Ext. 205

155 East Main Street
Smithtown, NY 11787
P (631) 361-4400
F (631) 361-6400
http://www.linx.com
 
 
 





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:25:2054
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/25
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:25
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.25
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Parent Message unknown RE: SQL Question: CONTINUED

by Robert Harrison-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> convert(varchar(255),ntextfield)

That was the answer. When you do "convert(varchar(300),ntextfield) as
newname" it works.

Thanks. And now I feel better that I wasn't being just stupid this
morning. It was a little odd.


Robert B. Harrison
Director of Interactive Services, Ext. 205

155 East Main Street
Smithtown, NY 11787
P (631) 361-4400
F (631) 361-6400
http://www.linx.com
 
 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:25:2055
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/25
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:25
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.25
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54