Viewing 15 posts - 2,206 through 2,220 (of 3,544 total)
I wonder if you get overflow or page faults ![]()
Only joking, lol ![]()
Far away is close at hand in the images of elsewhere.
Anon.
August 31, 2005 at 9:47 am
![]()
That's twice then ![]()
Far away is close at hand in the images of elsewhere.
Anon.
August 31, 2005 at 9:42 am
| for me, it means single dimension |
Well, I'd hate to see how long your piece of paper is...
Far away is close at hand in the images of elsewhere.
Anon.
August 31, 2005 at 9:40 am
Well, sushila, you're heaping so many on Remi (must have broad shoulders or a large back) thought there might be a few for me ![]()
Far away is close at hand in the images of elsewhere.
Anon.
August 31, 2005 at 9:36 am
Mine would be cockupR'us
![]()
Far away is close at hand in the images of elsewhere.
Anon.
August 31, 2005 at 9:23 am
Another alternative
CREATE TABLE #temp (Location int,Item int,SalesWeek int,Qty int)
INSERT INTO #temp (Location,Item,SalesWeek,Qty)
SELECT Location,Item,SalesWeek,MAX(Qty) FROM [#Table]
GROUP BY Location,Item,SalesWeek
SELECT a.Location,a.Item,a.SalesWeek,a.Qty FROM #temp a
UNION
SELECT b.Location,b.Item,b.SalesWeek,MAX(b.Qty)
FROM [#Table] b
INNER...
Far away is close at hand in the images of elsewhere.
Anon.
August 31, 2005 at 9:17 am
Maybe
SELECT a.Location,a.Item,a.SalesWeek,a.Qty
FROM [Table] a
WHERE EXISTS (SELECT 1
FROM (SELECT TOP 2 x.Location,x.Item,x.SalesWeek,x.Qty
FROM [Table] x
WHERE x.Location=a.Location AND x.Item=a.Item AND x.SalesWeek=a.SalesWeek
ORDER BY x.Qty DESC ) y
WHERE...
Far away is close at hand in the images of elsewhere.
Anon.
August 31, 2005 at 8:57 am
I'll raise your pedantic with a pedantic, the query does not return a table but a recordset ![]()
The recordset can be interpreted as a table...
Far away is close at hand in the images of elsewhere.
Anon.
August 31, 2005 at 8:17 am
Provided the AtachmentID's are sequential for each MsgID (and start at 1) then you could try this
DECLARE @maxid int,@count int,@sql nvarchar(1000),@countstr varchar(10)
SELECT @maxid = MAX([AttachmentID]) FROM t_Attachments
CREATE TABLE #temp ([MsgID]...
Far away is close at hand in the images of elsewhere.
Anon.
August 18, 2005 at 10:58 am
Not quite true. TOP keyword is SQL7 (level 70) onwards only and the error is a symptom of compatabilty albeit the poster says it is not.
Remi, your code works because of the...
Far away is close at hand in the images of elsewhere.
Anon.
August 12, 2005 at 8:10 am
If there are only 2 attachments then
SELECT
a1.AttachmentID AS [AttachmentID1],
a1.MsgID AS [MsgID1],
a1.[FileName] AS [FileName1],
a1.AttachmentContents AS [AttachmentContents1],
a2.AttachmentID AS [AttachmentID2],
a2.MsgID AS [MsgID2],
a2.[FileName] AS [FileName2],
a2.AttachmentContents AS...
Far away is close at hand in the images of elsewhere.
Anon.
August 12, 2005 at 7:27 am
Monthly below and does 1 month from the start date.
Depending on what Quarterly means you could revise this accordingly
DECLARE @NoofDays int, @StartDate char(8), @sql varchar(4000)
SET @StartDate = '20050801'
SET...
Far away is close at hand in the images of elsewhere.
Anon.
August 5, 2005 at 4:30 am
try
exec sp_executesql @sql, N'@CDM nvarchar(1)', @CDM
instead of the exec
Far away is close at hand in the images of elsewhere.
Anon.
August 4, 2005 at 7:26 am
Just for fun
ISNULL(STUFF(STUFF(SOR_CODE,PATINDEX('%[0-9][a-z]%',SOR_CODE)+1,LEN(SOR_CODE),''),1,PATINDEX('%[0-9]%',SOR_CODE)-1,''),'')
Far away is close at hand in the images of elsewhere.
Anon.
August 4, 2005 at 7:08 am
Try this
DECLARE @Mode varchar(10), @StartDate char(8), @sql varchar(4000)
SET @Mode = 'Weekly'
SET @StartDate = '20050804'
SET @sql = '
DECLARE @StartDate datetime SET @StartDate='''+@startdate+''' SELECT DISTINCT 1,l.ResourceDesc,l.ResourceDesc AS [Desc]'
SELECT @sql...
Far away is close at hand in the images of elsewhere.
Anon.
August 4, 2005 at 3:20 am
Viewing 15 posts - 2,206 through 2,220 (of 3,544 total)