+ Reply to Thread
Results 1 to 2 of 2

Thread: Update Stuff-type

  1. #1
    Barn Enthusiast Flam is an unknown quantity at this point Flam's Avatar
    Join Date
    Dec 2008
    Posts
    249
    Rep Power
    4

    Update Stuff-type

    Hi Guys,

    I was wondering what the best way to approach this next problem would be.

    Here's the data:

    Emp.Col1___Emp.Col2____Emp.Col3
    305 _______Operator____Available Thursdays

    When I'm archiving former employees from the Emp table,
    we take the number from Col1 and the string from Col2 and place
    them manually in Col3. (Don't worry, 305 is not a pk or index)

    So I was thinking of doing an update query that would move 305 and Operator at the beginning of Col3 to look like this:

    Emp.Col1____Emp.Col2____Emp.Col3
    _______________________305 Operator Available Thursdays


    I thought of using stuff, but I never know if there will be a value
    in Col3 or not. I basically always want the former values of Col1 and Col2 to show in a specific order at the beginning of the Col3 column.

    Thanks!

  2. #2
    Barn Enthusiast Flam is an unknown quantity at this point Flam's Avatar
    Join Date
    Dec 2008
    Posts
    249
    Rep Power
    4

    Hmmm...You know what...I think I figured it out:

    UPDATE Emp
    Set col3=col1+''+col2+'+''+col3

    Anyone see any pitfalls with this or a better way to go about it?

+ Reply to Thread

Similar Threads

  1. Unable to cast object of type...
    By Shem in forum .NET Development
    Replies: 2
    Last Post: July 2nd, 2009, 06:47 PM
  2. Re-direct based on member type?
    By Centurion in forum ASP Development
    Replies: 8
    Last Post: March 24th, 2009, 02:48 PM
  3. Button Type vs Input Type??????
    By Centurion in forum HTML & CSS Help
    Replies: 11
    Last Post: February 23rd, 2009, 10:23 AM
  4. Create control according to their data type
    By guddu in forum .NET Development
    Replies: 53
    Last Post: January 23rd, 2009, 12:21 PM
  5. Type mismatch: HTMLEncode
    By Rebelle in forum ASP Development
    Replies: 20
    Last Post: March 28th, 2008, 10:30 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