Viewing 15 posts - 7,441 through 7,455 (of 10,144 total)
-- generate a row for every unit bought / sold.
-- I guess this could be adapted to use the least common denominator
-- Another possibility is to use an iTVF (inline...
September 8, 2010 at 8:33 am
dbowlin (9/8/2010)
September 8, 2010 at 7:38 am
seshireddy524 (9/8/2010)
hi i am generating primary key with identity 10 and i am incrementing by 10.Unfortunatly the order takes place like 10,50,60.so now i want to place them in order...
September 8, 2010 at 5:48 am
Please adjust either the third query or the sample data so that the third query returns a row:-
IF OBJECT_ID( 'tempdb..#Sample') IS NOT NULL DROP TABLE #Sample
CREATE TABLE #Sample (RowID INT,...
September 8, 2010 at 4:29 am
bhutchin (9/1/2010)
I am using sql 2008. This query is designed to get all patients that were readmitted within 30 days of their previous hospital discharge...
Your "key" filter is to include...
September 8, 2010 at 3:10 am
richard.kirby (9/7/2010)
September 8, 2010 at 2:19 am
sharonmtowler (9/7/2010)
i use all the fields in the report,
replication date is a date field when...
September 8, 2010 at 2:06 am
Lynn Pettis (9/7/2010)
Received a PM from a newbie (noobie, no posts as of yet) asking for help. Told him to post...
September 7, 2010 at 9:03 am
CirquedeSQLeil (9/7/2010)
crookj (9/7/2010)
dbowlin (9/7/2010)
As the Uniblab would say."Work, Work. Everybody, back to work. Work. Work."
And just out of curiosity, what would the teleprompter say? :ermm:
Joe
Sleep sleep. Everybody...
September 7, 2010 at 8:23 am
-- do your date arithmetic up front
DECLARE @StartToday DATETIME
SET @StartToday = DATEADD(dd, DATEDIFF(dd, 0, GETDATE()), 0)
SELECT @StartToday
-- no more DISTINCT: which row would you pick from the dupes?
-- If...
September 7, 2010 at 8:14 am
Hi Sharon
I think this query can be simplified quite a bit. First though, a couple of questions. Is the DISTINCT necessary, and if so why?
What datatype is the column REPLICATION_DATE?
What...
September 7, 2010 at 7:54 am
Here's a nice APPLY version:
SELECT d.EmployeeName,
d.Id,
TicketNumbers = STUFF(iTVF.TicketNumbers, 1, 1, SPACE(0))
FROM @Tab d
CROSS APPLY
(SELECT ',' + CAST(HelpdeskTicketNo AS VARCHAR)
FROM @Tab
WHERE id = d.id...
September 7, 2010 at 7:40 am
Madhivanan-208264 (9/7/2010)
Note that @s1 is declared as varchar(10) whereas @s2 as varchar(20). Use varchar(20) for @s1 and see the result. It gives the correct result
It's not as simple as changing...
September 7, 2010 at 7:12 am
ekknaveen (9/7/2010)
aa
Yeah I know and it's not even wednesday yet.
September 7, 2010 at 6:36 am
You will get much quicker answers if you post table creation / data insertion scripts as follows:
CREATE TABLE #tblImage (
ImageID int IDENTITY(1,1) NOT FOR REPLICATION NOT NULL,
[Image] image NOT NULL,
[FileName]...
September 7, 2010 at 6:34 am
Viewing 15 posts - 7,441 through 7,455 (of 10,144 total)