Hi all,
I hope you can help me.
I am busy testing a C# app, and would like to update 200 database records with data for testing. I would like to update random 10% of certain fields with data.
This is the table structure:
SELECT [RowID]
,[Finance_Project_Number]
,[Finance_Project_Type]
,[Finance_Project_Description]
,[Finance_Project_Region]
,[Customer_Number]
,[Processing_Signal]
,[Processing_Result]
,[Processing_Result_Text]
,[Infor_Customer_Code]
,[Infor_Project_Number]
,[Insert_Datetime]
,[Processed_Datetime]
,[Infor_Row_ID]
,[Infor_Status]
,[Resolution_Message]
,[Resolution_Date]
FROM [InterfaceInfor].[dbo].[ProjectMaster]
I would like something like this (some pseudo code):
UPDATE TOP (200) * FROM [InterfaceInfor].[dbo].[ProjectMaster]
SET ([Finance_Project_Number] = '' (random 10%),
[Finance_Project_Type] = '' (random 10%), )
[Finance_Project_Region]= 'GAUTENG' (random 10%), )
[Processing_Result]= '0' (random 10%), )
[Finance_Project_Type] = '' (random 10%) )
Thank you in advance!
3 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
onmyway365 .Posted Jan 19, 2016, 4:37 AM
onmyway365 .Posted Jan 19, 2016, 2:43 AM
Manas MohapatraPosted Jan 19, 2016, 2:33 AM