I have a contact form on a web site with a submit button. The fields are validated by a js file that returns true if no errors or false if errors to the form. If no errors, I need to call an asp file which will just create and send an email that contains the info from the contact form...
Yes, I see what you are doing --(in the final cost-(cost * sum(percent) -- that percent would be the sum of all the percents that have been processed, I am presumming. So if you have done .33 and .33, then that calc is cost - 66 = 34 which would be the amount for the last percentage that was...
I have a table as such:
ID cost
1 654.77
2 953.54
3 345.98
...
for each of these ID's I have in a child table a list of percentages that equal 100 for each ID: (the percent has 4 dec places but here putting 2 for symplicity.
ID percent
1 .50
1...
Ok, can't believe I got it. I just changed the varchar to Nvarchar and it worked. Why did I need to change it. I thought it just was unicode declaration.
I did not change the variable table but would like to know the pros and cons. Isn;t the other method a cursor and isn't that considered...
I have also tried Denis helpful solution but still getting error: Procedure expects parameter '@statement' of type 'ntext/nchar/nvarchar'. This occurs on the exec statement. Here is my translation of the example Denis had:
DECLARE @SQLString VARCHAR(500)
declare @fieldval char(10)
declare...
I am still having a problem with applying your solution. (I get error: Must declare the variable '@tmp_tbl')
here is what I am doing. I have changed var names to make it easier. I might have confused what variables to use. I am not sure what to do in the select string.
declare @tmp_tbl...
I have a stored proc in sql server 2000. I need to set a variable using a dynamic query:
set @SQLstring = 'select ' + @x1 + ' from tblAssettype where assettypeid = ' + cast(@atype as varchar(18))
EXEC(@SQLstring)
This works fine and returns a string. However, I have to run this query...
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.