Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7740055
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T08:40:36+00:00 2026-06-01T08:40:36+00:00

I am facing the problem while inserting data this way. How to insert data

  • 0

I am facing the problem while inserting data this way.

enter image description here

How to insert data this way using stored procedure.

INSERT INTO [dbo].tbl_Transaction                
        (                
             [FK_GameID] ,            
             [SpotID] ,            
             TransactionReason ,            
             TransactionType ,            
             TransactionAmount
             --PrevAmountBalance,
            -- CurrentBalance
        )                
       SELECT tblTransaction.Row.value('@FK_GameID','BIGINT'),            
       tblTransaction.Row.value('@SpotID','SMALLINT'),            
       tblTransaction.Row.value('@TransactionReason','SMALLINT'),            
       tblTransaction.Row.value('@TransactionType','Varchar(50)'),            
       tblTransaction.Row.value('@TransactionAmount','MONEY')
       --@OpeningBalance,
       -- (@OpeningBalance-tblTransaction.Row.value('@TransactionAmount','MONEY'))
       FROM @TransactionTable.nodes('/row') AS tblTransaction(Row)   
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T08:40:38+00:00Added an answer on June 1, 2026 at 8:40 am
    create table #balances(
    id int not null identity(1,1),
    opening_balance int, 
    closing_balance int, 
    t_type varchar(50))
    

    to start the table (if you don’t have this you will have to deal with NULLs)

    insert into #balances values (100 , 100 , 'start')
    

    query:

    insert into #balances values(
    (select top 1 closing_balance from #balances order by id desc),
    300, --new value
    'credit')
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am facing some problem while returning data from web services. I am using
Hi I am facing this problem while building a source using ant Problem: failed
I am facing a problem while creating a static cursor in DB2. This is
I am new to Android development and facing a problem while using AndEngine. I
Am facing a problem, while creating components through TOM API using .NET/COM Interop. Actual
I am learning OpenCV using Learning OpenCV book. One problem I am facing while
I am facing this problem while installing extensions, themes basically anything from magento connect.
I am facing a problem while using Russian locale, Time Zone part of the
Hai... i am facing a problem while inserting values to an array. the programming
I'm facing a problem while unit testing my forms. The problem is that data

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.