Viewing 7 posts - 16 through 22 (of 22 total)
Took me a little bit of thinking but quite simple in the end.
Use this select statement as the source for an UPDATE query...
SELECT
M.*,
'NewAmount' = (
SELECT
Amount
FROM
mytable
WHERE
[Date] = M.[Date]
ANDAOD = DATEADD(mm,-1,M.AOD)
)
FROM
mytable...
September 24, 2008 at 5:12 am
Hello,
Before I give you the script I should point out that it seems to me that your table CustPriceList is redundant. It is just a product of the tables Customer...
September 22, 2008 at 7:28 am
As I suggested before, change the default value that the parameters have in your procedure.
So instead of:
CREATE PROCEDURE [dbo].[usp_EmpSearchResult]
@EmpID Int =...
September 19, 2008 at 3:41 am
I'm sorry but I really don't understand what the problem is. Perhaps you can post some sample data and sample parameter values and explain what result you expect to see....
September 18, 2008 at 9:14 am
If you run this code below, you will see that if you set the @Parameter variable to NULL, all 3 rows are returned. If you set it to a value...
September 18, 2008 at 7:15 am
I'm not entirely sure what your problem is but...
You say that you are passing parameters (to be used in your WHERE clause by the looks of it) which may or...
September 18, 2008 at 4:42 am
I don't know if this helped the original poster but it certainly helped me. Thank you all very much (I used Piotr's example pretty much as it was given as...
July 31, 2008 at 7:12 am
Viewing 7 posts - 16 through 22 (of 22 total)