Cmdlets for Teradata

Build 24.0.9060

Update-Teradata Cmdlet

Parameters   Output Objects  

Updates Teradata data.

Syntax

Update-Teradata [parameters]

Remarks

The Update-Teradata cmdlet allows you to use a syntax similar to SQL UPDATE statements to update Teradata data.

$conn = Connect-Teradata -User 'Admin' -Password 'test123' -Database 'Northwind' -DataSource '127.0.0.1'
Update-Teradata -Connection $conn -Table "`"CData`".`"dbo`".NorthwindProducts" -Columns @("ProductName") -Values @("Jon Doe") -Id "1"
The Where parameter can also be used to specify the primary key of the table:
Update-Teradata -Connection $conn -Table "`"CData`".`"dbo`".NorthwindProducts" -Columns @("ProductName") -Values @("Jon Doe") -Where "ProductId = '1'"
The primary key can also be passed to the cmdlet along the pipeline:
Select-Teradata -Connection $conn -Table "CData"."dbo".NorthwindProducts -Where "CategoryId = '5'" | Update-Teradata -Columns @("CategoryId") -Values @("5 2")

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9060