parpaa
asked on
select query
Hi all
I have very simple requirement... I have a table [TM_C_details] with accountno,custname,city,co untry,zone .
now i have to create new column 'Unique A/c' into another table [TM_NEW_TABLE] if the acountno is unique then Unique a/C should be 1 else 0.
Hope am clear... any suggestions are highly appreciated.
I have very simple requirement... I have a table [TM_C_details] with accountno,custname,city,co
now i have to create new column 'Unique A/c' into another table [TM_NEW_TABLE] if the acountno is unique then Unique a/C should be 1 else 0.
Hope am clear... any suggestions are highly appreciated.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks @Patel
Unfortunately NO PRIMARY KEYS HAVE BEEN DEFINED FOR THE TABLES..
Unfortunately NO PRIMARY KEYS HAVE BEEN DEFINED FOR THE TABLES..
ASKER
@Kamal thanks so much..
It worked
It worked
Select 1 from TM_C_details where PrimaryKey <> current row Primary Key
If return 1 then put 1 in [TM_NEW_TABLE]