Viewing 15 posts - 3,181 through 3,195 (of 5,590 total)
I'd suggest something along the line of:
DECLARE @Files TABLE (FileName varchar(100));
declare @sql varchar(max),
@FilePath varchar(100),
@FileName...
September 15, 2010 at 3:08 pm
Stefan Krzywicki (9/15/2010)
Alvin Ramard (9/15/2010)
CirquedeSQLeil (9/15/2010)
jcrawf02 (9/15/2010)
bitbucket-25253 (9/15/2010)
By the way for some reason going down is always slower and harder than going up.
Couldn't have anything to do with the fact...
September 15, 2010 at 2:50 pm
Craig Farrell (9/15/2010)
sql.abhishek (9/15/2010)
I am desperately looking for some piece of code to get this type of out put .... kindly help me out of this.
For the code, you'll really...
September 15, 2010 at 2:42 pm
You're quite welcome. Glad I could help.
jeff.mason (9/15/2010)
September 15, 2010 at 2:25 pm
Derrick Smith (9/15/2010)
You mean you want to pull the two most recent orders for each product, sorted by OrderDate, and then display the corresponding OrderNumber, right?
FelixG (9/15/2010)
September 15, 2010 at 2:10 pm
jeff.mason (9/15/2010)
September 15, 2010 at 2:03 pm
Something like this should get the top two of each:
DECLARE @Orders TABLE (ProductCode int, OrderDate datetime, OrderNumber varchar(5));
INSERT INTO @Orders
SELECT 1, '20100915', '11112' UNION ALL
SELECT 1, '20100823', '11122' UNION ALL
SELECT...
September 15, 2010 at 2:00 pm
Yes.
select t1.*
from dbo.table1 t1
LEFT JOIN dbo.table2 t2
ON t1.col1 = t2.col1
...
September 15, 2010 at 1:50 pm
jeff.mason (9/15/2010)
I think I am going to kill that developer tomorrow....
Why wait that long? A 5 minute start is all he should get... :w00t:
September 15, 2010 at 1:47 pm
Craig Farrell (9/15/2010)
WayneS (9/15/2010)
Craig Farrell (9/15/2010)
[EDIT:] Heheh, Wayne, fastest code gun in the west. 🙂 [/EDIT]Maybe, but sometimes it's draw,shoot,aim instead of aim,shoot,draw... heh, wait-a-minute... :crazy:
And thus, we find...
September 15, 2010 at 1:41 pm
INSERT INTO dbo.ContractItems
(
Trading_Partner_ID,
Corp_Item_Num,
ContractID,
IsRebateEligible,
ChangedDate,
ChangedUser
)
SELECT
cs.Corp_Item_Num,
cs.Trading_Partner_ID,
ContractID,
0 IsRebateEligible,
GETDATE() ChangedDate,
SUSER_SNAME() ChangedUser
Are the items in bold in the wrong order?
September 15, 2010 at 1:37 pm
Wouldn't you use DT_DBDATE instead of DT_DBTIMESTAMP? Also, try replacing the "/" with "."
September 15, 2010 at 1:30 pm
Craig Farrell (9/15/2010)
[EDIT:] Heheh, Wayne, fastest code gun in the west. 🙂 [/EDIT]
Maybe, but sometimes it's draw,shoot,aim instead of aim,shoot,draw... heh, wait-a-minute... :crazy:
September 15, 2010 at 1:08 pm
Hey you'll...
I know a lot of people don't like Joe Celko's online personna. You might be interested in how his tone changed in this thread after it was discovered the...
September 15, 2010 at 11:07 am
No problem - glad I could help.
September 15, 2010 at 11:02 am
Viewing 15 posts - 3,181 through 3,195 (of 5,590 total)