Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Select Statement

Reply
Thread Tools

Select Statement

 
 
bbawa1@yahoo.com
Guest
Posts: n/a
 
      06-20-2007
Hi,

I have the following query. my message field is of datatype text.
But I want to grag just first 50 characters + ...
from that "message" field. How can I do that.

The following is my sql statement

select tck.ticketid,tckmsg.message
from tbtickets tck inner join tbticketsmessages tckmsg
on tck.ticketid = tckmsg.ticketid and tcktstatusId = 1

 
Reply With Quote
 
 
 
 
David Wier
Guest
Posts: n/a
 
      06-20-2007
if you want to do it in SQL, check out 'substring':
http://doc.ddart.net/mssql/sql70/setu-sus_17.htm

when presenting the data on the page, are you using a Gridview/DataSource
control, or creating the code- then databinding, or .....?

--
David Wier
MVP/ASPInsider
http://aspnet101.com
http://iWritePro.com



<> wrote in message
news: ups.com...
> Hi,
>
> I have the following query. my message field is of datatype text.
> But I want to grag just first 50 characters + ...
> from that "message" field. How can I do that.
>
> The following is my sql statement
>
> select tck.ticketid,tckmsg.message
> from tbtickets tck inner join tbticketsmessages tckmsg
> on tck.ticketid = tckmsg.ticketid and tcktstatusId = 1
>



 
Reply With Quote
 
 
 
 
bbawa1@yahoo.com
Guest
Posts: n/a
 
      06-20-2007
On Jun 20, 1:06 pm, "David Wier" <davidw...@davidwier.nospam.com>
wrote:
> if you want to do it in SQL, check out 'substring':http://doc.ddart.net/mssql/sql70/setu-sus_17.htm
>
> when presenting the data on the page, are you using a Gridview/DataSource
> control, or creating the code- then databinding, or .....?
>
> --
> David Wier
> MVP/ASPInsiderhttp://aspnet101.comhttp://iWritePro.com
>
> <bba...@yahoo.com> wrote in message
>
> news: ups.com...
>
>
>
> > Hi,

>
> > I have the following query. my message field is of datatype text.
> > But I want to grag just first 50 characters + ...
> > from that "message" field. How can I do that.

>
> > The following is my sql statement

>
> > select tck.ticketid,tckmsg.message
> > from tbtickets tck inner join tbticketsmessages tckmsg
> > on tck.ticketid = tckmsg.ticketid and tcktstatusId = 1- Hide quoted text -

>
> - Show quoted text -


I am using GridView datasource.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
if statement that, when false, skips first statement in its block, executes second? Jay McGavren Java 11 01-16-2006 05:49 PM
How do I do a conditional statement in a constant statement? tkvhdl@gmail.com VHDL 3 12-16-2005 06:13 PM
exec "statement" VS. exec "statement in globals(), locals() Ted Python 1 07-22-2004 08:51 AM
exec "statement" VS. exec "statement" in globals(), locals() tedsuzman Python 2 07-21-2004 08:41 PM
select of select box will select multiple in another box palmiere Javascript 1 02-09-2004 01:11 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57