I am trying to check and see if a checkbox has been selected. The checkbox is an array, there are multiple checkbox' for each transaction line. The checkbox is out to the side and they select it if the transaction was a returned check. The following is my code:
dim nsfCheck(100)
dim nsfChecked...
I am attempting to see if a user has selected a checkbox and if they did, update two database tables and gray out the checkbox so that it remained checked and cannot be changed on another screen. Here is my code so far:
'Declare variable
dim nsfCheck
'Initialize variable
nsfCheck = False...
Thanks AlexCuse, Rac2, CatAdmin, and ESquared for all of your help. I agree, that this will probably be better done with a stored procedure, however, I have not written a stored procedure in SQL before, so forgive me for thinking that this is what I was doing. Any suggestions? Also, to answer...
Alex,
When I run it this way:
@C_RunningBal = CASE
WHEN j.description = 'Bad Check Fee'
THEN -j.amount + @C_RunningBal
WHEN j.Description = 'NSF (Bad Check)'
THEN -j.amount + @C_RunningBal
WHEN j.Description = 'NSF Check'
THEN -j.amount + @C_RunningBal
ELSE...
I have tried three ways:
@C_RunningBal = CASE
WHEN (select j.description from journal
WHERE j.description = 'Bad Check Fee'
THEN select sum(-j.amount) + @C_RunningBal AS "Running Balance"
WHERE j.Description = 'NSF (Bad Check)'
THEN (sum(-j.amount) + @C_RunningBal) AS...
Thanks AlexCuse,
I am having a problem with calculation of the running balance in that it doesn't change with each record it just total's all records and gives the result at the end of each row. Also, I am placing it in a Temp table. How can I implement the while loop? Also, I'm not ordering it...
I am new to SQL Server. I am trying to increment through my journal records and keep a 'Running Balance' while incrementing through each record. I also need a CASE statement to re-add a transaction if it had a 'NSF' fee. My code is below. So far I have attempted the CASE statement, but it isn't...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.