+ Reply to Thread
Results 1 to 3 of 3

Thread: Copy From 1 field to another minus first 2 characters

  1. #1
    Lazy Bum micky is a jewel in the rough micky is a jewel in the rough micky is a jewel in the rough micky is a jewel in the rough micky's Avatar
    Join Date
    Jul 2008
    Location
    India
    Posts
    1,763
    Blog Entries
    2
    Rep Power
    8

    Copy From 1 field to another minus first 2 characters

    Hey
    I have a table which has a field which has a keyword (eg: KW....)

    Now i have to add a field in this table which should have the same value as in Keyword field but without first two characters KW.

    This query will copy the Keyword field to other field.
    Code:
    update tblTable set Keyword1 = Keyword
    
    But how to remove the first 2 characters??

    Any ideas?
    Thanx

    MS SQL 2000

  2. #2
    Super Sarcasm Mistress mehere is a glorious beacon of light mehere is a glorious beacon of light mehere is a glorious beacon of light mehere is a glorious beacon of light mehere is a glorious beacon of light mehere's Avatar
    Join Date
    Mar 2008
    Location
    Wide Awake In Dreamland
    Posts
    830
    Rep Power
    8

    something like this:
    Code:
    UPDATE tblTable SET Keyword1 = substring(Keyword,3,len(Keyword))
    
    Quote of the Month:
    INSIGHT: When the going gets tough, the tough get going. The smart left a long time ago.

    Questions to Ponder:
    Are people more violently opposed to fur rather than leather because it's much easier to harass rich women than motorcycle gangs?

    iif([sarcasm]=true,iif([you have to ask]=true,"didn't work","ha ha ha"),"not sarcasm")
    copyright © 2008 sbenj69

    Sarchasm: The gulf between the author of sarcastic wit and the person who doesn't get it.

  3. #3
    Lazy Bum micky is a jewel in the rough micky is a jewel in the rough micky is a jewel in the rough micky is a jewel in the rough micky's Avatar
    Join Date
    Jul 2008
    Location
    India
    Posts
    1,763
    Blog Entries
    2
    Rep Power
    8

    Perfect, Thanx Mehere

+ Reply to Thread

Similar Threads

  1. pull by first four characters?
    By Rebelle in forum Microsoft Access
    Replies: 1
    Last Post: June 30th, 2009, 12:36 PM
  2. Copy record
    By Rebelle in forum ASP Development
    Replies: 2
    Last Post: April 20th, 2009, 01:42 PM
  3. Trying to copy a record from one table to another
    By bryceowen in forum SQL Development
    Replies: 10
    Last Post: April 14th, 2009, 08:51 PM
  4. Field that is a link (rs) and/or text field question
    By Rebelle in forum ASP Development
    Replies: 14
    Last Post: August 12th, 2008, 09:43 AM
  5. special characters
    By Jaykappy in forum SQL Development
    Replies: 1
    Last Post: May 21st, 2008, 11:50 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

SEO by vBSEO