Cmdlets for Sybase

Build 24.0.9060

Update-Sybase Cmdlet

Parameters   Output Objects  

Updates Sybase data.

Syntax

Update-Sybase [parameters]

Remarks

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

$conn = Connect-Sybase -User 'myUser' -Password 'myPassword' -Database 'NorthWind' -Server 'myServer'
Update-Sybase -Connection $conn -Table "[master].[dbo].Products" -Columns @("ProductName") -Values @("Ikura") -Id "22"
The Where parameter can also be used to specify the primary key of the table:
Update-Sybase -Connection $conn -Table "[master].[dbo].Products" -Columns @("ProductName") -Values @("Ikura") -Where "Id = '22'"
The primary key can also be passed to the cmdlet along the pipeline:
Select-Sybase -Connection $conn -Table [master].[dbo].Products -Where "ProductName = 'Konbu'" | Update-Sybase -Columns @("ProductName") -Values @("Konbu 2")

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