Results 1 to 2 of 2

Thread: Sql database query

Threaded View

  1. #1

    Thread Starter
    Member Ahmed Shahni's Avatar
    Join Date
    Feb 2011
    Posts
    45

    Lightbulb Sql database query

    Dear Sir,

    I'm using SQLserver 2008 and I have a below mentioned Query working successfully, now my requirement is I want to execute the same code in vb.net (Visual Studio 2010) it is a update Table command so how to convert and run in vb.net

    Code:
    DECLARE @Rt int
    SET @Rt = 0
    
    UPDATE DB.dbo.Sales
    SET @Rt = Total = @Rt + Area1 + Area2
    FROM DB.dbo.Sales
    Please please help me to solve it.

    Thanks in advance.
    Last edited by Ahmed Shahni; Apr 10th, 2011 at 03:01 AM. Reason: Spelling corrections

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width