Viewing 15 posts - 91 through 105 (of 921 total)
that's more than the guys at Enron and MCI Worldcom can say
They're preparing to say (on the stand): "Unfortunately I don't know any accounting, so this is very confusing...
March 9, 2004 at 2:07 pm
CREATE TABLE #Temp(
Col1 int,
Col2 int)
INSERT #Temp
EXEC p_Test 'YourParam'
Put all the DDL at the beginning of your calling proc to prevent excessive recompiles.
March 9, 2004 at 1:54 pm
Unfortunately I know some accounting, so this is very confusing to me.
Please post the DDL and some sample data with an example of...
March 9, 2004 at 1:51 pm
There are lots of ways to do this.
March 9, 2004 at 1:39 pm
Yes. That's typically how one deals with a set returned from a called proc.
March 9, 2004 at 1:19 pm
UPDATE SCH_SET
SET fac_send_date = DateAdd(n, fdate_cnt*24*60 + fhour*60 + fmin, f.book_date)
FROM SCH_SET t, FAC_BOOK f
WHERE upper(set_id) = 'A000001' and upper(pcode) = 'A'
March 9, 2004 at 10:14 am
If that's what you want...
SELECT ISNULL(i.FEmpID,o.FEmpID) FEmpID, i.FTime FTimeIn, o.FTime FTimeOut, CONVERT(char(5),o.FTime - i.FTime,14) Hours
FROM Punches i FULL JOIN Punches o ON i.FEmpID = o.FEmpID AND o.FType = 'OUT' AND...
March 9, 2004 at 9:25 am
It now sounds as though you should not be using a method incorporating the identity property. Alter the stored procedure so it optionally takes a prefix and/or number.
CREATE...
March 9, 2004 at 8:51 am
If the first character is input but the numeric portion is automatically increasing, then you could use bbron's suggestion of a table holding the last number used.
CREATE TABLE SeqNos(
Type char(4)...
March 9, 2004 at 7:53 am
About the only reason to do this with dynamic SQL is if those responsible for the front-end code are not conversant with SQL. As that is where your clauses are...
March 9, 2004 at 5:36 am
If you have any indexes on the ID columns, this will probably be fastest:
DELETE FROM StagingIn
WHERE NOT EXISTS
(SELECT *
FROM Plans
WHERE ID1 = StagingIn.ID1
AND ID2 = StagingIn.ID2
AND ID3 =...
March 9, 2004 at 5:27 am
No, as I wrote, you only need one local variable:
declare @DidItError int
insert statement ....
set @DidItError = @@error
update....
set @DidItError = @DidItError + @@error
if @DidItError > 0 then
rollback
else
commit
March 8, 2004 at 3:17 pm
> Maybe I have to save the @@error to a var after every statement, then at the end evaluate that var to see if there was errors?
Yes, the @@error value...
March 8, 2004 at 2:56 pm
CREATE TABLE test(
IntID int identity(0,1) CHECK (IntID < 260000),
StringID AS CHAR(IntID/10000 + 65) + RIGHT('0000' + CAST(IntID AS varchar(10)),4))
You could also do this with a view instead of a computed...
March 8, 2004 at 2:46 pm
Viewing 15 posts - 91 through 105 (of 921 total)