never mind. update mytable set tbl.col_1 = tbl_col2 where col_1 is null
xcavin
Posts
-
SQL Query to update col_1 with col_2 value -
SQL Query to update col_1 with col_2 valueHow to write a MS_SQL query to populate a column from another column. I have a table:
name col_1 col_2
name1 null value1
name2 null value2The result should be as follows:
name col_1 col_2
name1 value1 value1
name2 value2 value2 -
query needed to swap column values for duplicateThat was real quick! thank you!
-
query needed to swap column values for duplicateuserid status phone_number
1 0 111
2 1 111
3 0 222
4 1 222
5 0 333
6 1 444For the above table I want write a SQL query to swap the value of "status" column for duplicate rows. Duplicates can be identified if phone number is same. The output would look like as below (affecting only 1,2,3 and 4).
userid status phone_number
1 1 111
2 0 111
3 1 222
4 0 222
5 0 333
6 1 444Any help is appreciated. I always find it always hard to write even a simple SQL query :(.
-
Got to MalaysiaI normally wait for some time till every one around has pushed their seats back espically the guy in front of me :) . However if it is a short trip i don't bother much.
-
to christian grausmeenakumar wrote:
some posts by you suggests you dont like indian companies. may be indian programmers. can you give more feedback . is it is, why is that so? is it the hidden dislike for indians altogether.. or just indian companies. or are there more things you hate i felt hurt so i am writing you.
Not sure about Christian. However seing similar posts quite often these days in the Lounge I have started atleast hating such peoples from India. Not to mention I am from India. A tip for you would be to read any post form Christian which you feel is a hatred comment against India over and over again till you realize what he is actually saying. I am sure you will have a different view sooner or later.
-
company restructureswolfbinary wrote:
Any body been through this?
of late every quater. can feel the tick every second inside the office :sigh:
-
How would you solve that?Vasudevan Deepak Kumar wrote:
Many Indian software cos do that.
Thank you for the info. How many :confused: India software company you know ?
-
Worse Than Global WarmingIs that only me who didn't get the joke ?
-
If only you could debug a woman...Will hard-code:
if (name == "cavin")
{
eAccessPrevilage = "Administrator";
}modified on Tuesday, October 14, 2008 4:23 PM
-
Can anyone suggest books on telecom domainAny good books or articles you would recommend for selftraining on telecom domain. I am looking to gain some knowledge on VoIP and IP-PBXs, but having very little knowledge on the telecom would prefer to start from the basics.
-
Whining little rich boyThat is normal, in such a tense situation you will hope a lot and find all kind of weired reason to justify your hopes.
-
_variant_t AND FieldPtrgnanapaul wrote:
i was declared as _variant_t vc;
There lies the problem, you should have declared yourself as "real".
-
How to make sure the LPCRITICAL_SECTION i have is validMike Dimmick wrote:
At process exit time, why waste the time to free the critical section?
Process should never exist. But unfortuantely another thread is hung after trying to use this deleted hence uninitialized criticalsection !
-
How to make sure the LPCRITICAL_SECTION i have is validled mike wrote:
IMHO you are trying to solve the wrong problem.
True, I agree. But can't help, need to fix this way. Cannot afford to reduce the speed any more :(
-
How to make sure the LPCRITICAL_SECTION i have is validimagine a multiprocessor machine. The object which has a critical section member is deleted just before another thread tries to lock it. And on the destructor of this object delete_critical_section is called. I know to have a global synchronisation object and to resolve this issue, but that sync object would cost me lot time. And would be my last choice.
-
How to make sure the LPCRITICAL_SECTION i have is validDavidCrow wrote:
There really shouldn't be any reason for it not to be. This falls under the realm of good programming techniques.
Sorry to be impolite Leave the programming techniques. My question is simple, if debugger can find it, how can it be done within my program ?
-
How to make sure the LPCRITICAL_SECTION i have is validMark Salsbery wrote:
It's only a structure - there's no handle or function you can use to check its validity. It's up to you to manage its scope.
From the dump using CDB i can see if its uninitialized. So was wondering if this can be done it from my program itslef so that there is no need to create dump !
-
How to make sure the LPCRITICAL_SECTION i have is validHow to make sure the LPCRITICAL_SECTION i have is valid ?
-
How to make sure the LPCRITICAL_SECTION i have is validHow to make sure the LPCRITICAL_SECTION i have is a valid one ?. ie, suppose some other thread called a DeleteCriticalSection() on the same pointer then the pointer becomes invalid and the behaviour is undefined. So how to make sure this has not happend.