Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
pizzojm
Starting Member
20 Posts |
Posted - 2001-10-22 : 11:14:22
|
| Hello, I am trying to figure out warehouse space by customer from a financial table that one of our employees enters each month. If the user tries to select a month that has not already been entered I want the procedure to get a default value. Everything is working fine, except if the month has not been entered, the IF statement if not working. Take a look and let me know if with any solutions -- Thanks Much appreciated!CODE AS FOLLOWS:------------------CREATE PROCEDURE spWarehouseReport@customerID INT,@warehouseSpace INT OUTPUT,@xDate SMALLDATETIMEASSELECT @warehouseSpace=cubicFeetUsed FROM tblFinancial WHERE datePosted=@xDate AND customerID=@customerIDIF @warehouseSpace= ??? HERE IS THE PROBLEM! BEGIN SELECT @warehouseSpace=minGuarenteed FROM tblCustomers WHERE customerID=@customerIDEND------------------ |
|
|
|
|
|