Revert Question

Aug 17, 2007

how do we change the value of specific column?(not updating).
for example the value of ID 01 - 03 is 1 and ID 04 and 05 is 0. how do we revert it?
in one statement only

Table1
ID Value
01 1
02 1
03 1
04 0
05 0

View 1 Replies


ADVERTISEMENT

Revert To SP1

Apr 14, 2008

How to revert to SP1 from SP2 in SQL2K5? Can I simply reinstall SP1, do I need to keep anything in mind?


------------------------
I think, therefore I am - Rene Descartes

View 4 Replies View Related

The UDP/UDF/UDT Did Not Revert Thread Token.

Jan 24, 2008

I have been struggling with this error for a while now. Not much when I put it in the search engines. I get the error as follows when I execute this CLR stored procedure:


Msg 10312, Level 16, State 49, Procedure SpPICK00, Line 0

.NET Framework execution was aborted. The UDP/UDF/UDT did not revert thread token.

The code for the stored procedure is as follows. If anybody could offer any advice on what this error means I would appreciate it. I know through debugging that it's erroring out on the ImpContext = ClientID.Impersonate() line.


Dim DbCon As New SqlConnection("context connection=true")

Dim DbSql As New SqlCommand("SELECT TOP 1 * FROM TblTransactions", DbCon)

Dim TransactionID As Int64

DbSql.Connection.Open()

Dim DbRs As SqlDataReader

DbRs = DbSql.ExecuteReader

While DbRs.Read

TransactionID = DbRs("TransactionID")

End While

DbRs.Close()

Dim MenuID As Int16

Dim MONumber As String

Dim LineNumber As String

Dim PTUse As String

Dim SEQN As String

Dim WorkCentre As String

Dim Stock As String

Dim Bin As String

Dim Qty As Double



DbSql = New SqlCommand("SELECT * FROM VwPickList WHERE TransactionID = @TransactionID", DbCon)

DbSql.Parameters.Add("@TransactionID", SqlDbType.BigInt).Value = TransactionID

DbRs = DbSql.ExecuteReader

If DbRs.Read Then

MenuID = DbRs("MenuID")

MONumber = DbRs("MONumber")

LineNumber = DbRs("LineNumber")

PTUse = DbRs("PT_USE")

SEQN = DbRs("SEQN")

WorkCentre = DbRs("WorkCentre")

Stock = DbRs("Stock")

Bin = DbRs("Bin")

Qty = DbRs("Hours")

End If

DbRs.Close()

DbSql.Connection.Close()

DbCon.Dispose()

DbSql.Dispose()

Dim FSClient As New FSTIClient

Dim ClientID As WindowsIdentity

Dim ImpContext As WindowsImpersonationContext

ClientID = SqlContext.WindowsIdentity

ImpContext = ClientID.Impersonate

Shell("NET USE K: \FPTESTFShift", AppWinStyle.Hide)

FSClient.InitializeByConfigFile("K:Mfgsysfs.cfg", False, False)

If FSClient.IsLogonRequired Then

FSClient.Logon("VBS", "visib", "")

End If

If MenuID = 2 Then

Dim Pck As New PICK08

Pck.OrderType.Value = "M"

Pck.IssueType.Value = "I"

Pck.OrderNumber.Value = MONumber

Pck.LineNumber.Value = LineNumber

Pck.PointOfUseID.Value = PTUse

Pck.OperationSequenceNumber.Value = SEQN

Pck.ItemNumber.Value = WorkCentre

Pck.Stockroom.Value = Stock

Pck.Bin.Value = Bin

Pck.IssuedQuantity.Value = Qty

FSClient.ProcessId(Pck)

ElseIf MenuID = 1 Then

Dim Pck As New PICK04

Pck.OrderType.Value = "M"

Pck.IssueType.Value = "I"

Pck.OrderNumber.Value = MONumber

Pck.LineNumber.Value = LineNumber

Pck.PointOfUseID.Value = PTUse

Pck.OperationSequenceNumber.Value = SEQN

Pck.ItemNumber.Value = WorkCentre

Pck.IssuedQuantity.Value = Qty

FSClient.ProcessId(Pck)

End If

FSClient.Terminate()

ImpContext.Undo()


View 12 Replies View Related

How To Revert The Commited Query In MS Sql Server?

Aug 24, 2007

Accedentally i have updated the specific field by update query of the table and to preserve the previous data .....so please help me in this regard

How to revert the commited query in MS Sql Server?


ThanX in advance!!!!!!!!

View 4 Replies View Related

Transact SQL :: Bug In REVERT During Cross Database Call

Jul 28, 2015

I have noticed rather strange behaviour of EXECUTE AS and REVERT sequence during the cross database calls which appear to be a bug. I tested this issue on developer edition of SQL Server 2012

Microsoft SQL Server 2012 - 11.0.5343.0 (X64)
 May  4 2015 19:11:32
 Copyright (c) Microsoft Corporation
 Developer Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)

This issue causes problems in SSISDB where similar piece of code appears in [catalog].[start_execution] and some other scripts in the [internal] schema. This was previous discussed in [URL] The following script illustrates the issue:

USE [master]
GO
CREATE DATABASE [Test1]
GO
CREATE DATABASE [Test2]
GO

-- Set Database to Trustworthy to allow cross database connection

ALTER DATABASE [Test1] SET TRUSTWORTHY ON;
GO
ALTER DATABASE [Test2] SET TRUSTWORTHY ON;
GO
USE [Test2]
GO
CREATE PROCEDURE [dbo].[TestContext]
AS
SELECT 'EXECUTION CONTEXT BEFORE EXECUTE AS CALLER', SUSER_NAME(), USER_NAME();

[code]....

View 8 Replies View Related

Setup And Upgrade :: Won't Be Able To Revert Back To Original Settings

Jan 7, 2010

What's the diffrence between the Built-In account 'SERVICES' and the 'NT SERVICEALL SERVICES' ?I want to dploy a group poicy for 'user right assignment' - 'log on a service' to a server, which curretnly has among other things the 'NT SERVICEALL SERVICES' however i can't replicate this account for my GPO, (even locally on the server),I deploy the GPO and overwrite the server settings for 'user right assignment' - 'log on a service' and won't be able to revert back to the original settings..

View 5 Replies View Related

Revert Linked Report Param To Have 'override Default' ?

Oct 26, 2007

How can I change a linked report to get the 'override default' button back.

Some idiot changed it to a hardcoded value and now I want to have the default back.

View 1 Replies View Related

Package Changes Made And Saved Revert To Prior State When Package Closed And Re-opened

Jan 12, 2007

I copied and added an existing package as a new package to a project and have been having trouble with settings reverting to those for the original package after I modify and save the changes for the new package. Sometimes happens with the save itself, other times it happens when I close and re-open the package. Most cases are with connections that revert back to the original file reference, but there are also control flow and data flow elements that keep reverting back to either settings from the original package or defaults that result in the re-opened package being in error. Not sure how to get around this issue short of developing the new package from scratch which I'd rather not do since it is fairly complex. Any help anyone can provide is appreciated. Thanks.

View 8 Replies View Related

I Want To Revert Back To Original State Of Database Before I Performed Restore Database

Nov 15, 2006

Hello,i am in great trouble. I want to revert back to original state ofdatabase before i performed restore database on my sql server 2KDatabase. Accidently i didn't take backup of my Database and i didrestore, so is there any way to get the original state back of myDatabase?Any suggestion will be highly appriciated.Regards,S. Domadia.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved