PC Review


Reply
Thread Tools Rate Thread

How to assign value of one column to another using Inline sql query?

 
 
asgars
Guest
Posts: n/a
 
      11th May 2010
I have a inline SQL query in a VB.NET. It is something like this...

UPDATE EMPLOYEE SET NAME = ?, CONTACT= ?, OLDCONTACT = ?,

This is working fine when i assign a value for each of '?' marks using
SQLParameter. But here i need to copy one column's value into another
column. Like I want to copy the value of CONTACT column into
OLDCONTACT column.

I know this can be done easily by a using stored proc, like

UPDATE EMPLOYEE SET OLDCONTACT = CONTACT
(where OLDCONTACT and CONTACT are column of same table.)

How can I do it using inline query (the one shown above with question
marks)???
 
Reply With Quote
 
 
 
 
Patrice
Guest
Posts: n/a
 
      11th May 2010
Hello,

> I know this can be done easily by a using stored proc, like
>
> UPDATE EMPLOYEE SET OLDCONTACT = CONTACT
> (where OLDCONTACT and CONTACT are column of same table.)


Same than what you shown above with possibly a where clause. What have you
tried that doesn't work ?
--
Patrice



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
Need to assign Column Header Alias in MS Access Query Ray Microsoft Access Queries 0 16th Apr 2008 06:48 PM
SELECT...AS... Inline query Joshua Barnette Microsoft Access Forms 3 27th Feb 2006 07:01 PM
How to assign a column of URLs to Hyperlink Column of a DataGrid c =?Utf-8?B?ZGF2aWQ=?= Microsoft ASP .NET 10 17th Oct 2005 05:19 PM
looking to assign different numbers in column B to different words in column A mike Microsoft Excel Worksheet Functions 2 13th Jan 2005 01:46 AM
How do I add an inline comment to an SQL query? =?Utf-8?B?TWFyayBBbGxhbiBOZWxzb24=?= Microsoft Access Queries 4 10th Dec 2004 03:12 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:55 PM.