Viewing 4 posts - 1 through 4 (of 4 total)
I ran the query and see zero rows only, please verify your answer.
June 8, 2022 at 5:10 am
You can write the insert statement like
INSERT INTO myTable1([Col1], [Col2])
SELECT [Col1], [Col2]
FROM myTable2
WHERE [Col1] IN (SELECT MAX([Col1] FROM myTable2)
Does this solves your need.
April 10, 2009 at 1:16 pm
You can use Group By clause and Aggregate functions to solve these duplicates.
Try this
SELECTA.acct_num, A.record_type, A.trade_nbr, A.market, A.secy_type, A.capacity
FROM #trades A,
(
SELECT acct_num, record_type, MAX(trade_nbr)...
March 27, 2009 at 9:38 am
Just try this out and lemme know it worked r not...
DECLARE CURSOR FOR
SELECT STATEMENET
OPEN Cursorname
FETCH NEXT FROM Cursorname INTO Variables
WHILE (@@FETCH_STATUS=0 )
BEGIN
BEGIN TRAN
...
April 2, 2004 at 4:08 am
Viewing 4 posts - 1 through 4 (of 4 total)