Viewing 15 posts - 2,746 through 2,760 (of 2,894 total)
to convert string YYYY/MM/DD (which is close to safe ISO8601 format) into datetime you don't need anything other than:
SET DATEFORMAT ymd
DECLARE @date AS VARCHAR(10)
SET @date = '2010/01/29'
SELECT...
June 16, 2010 at 10:11 am
You can wrap you subquery into CTE or you can use cross apply like this:
SELECT L.LogTableKey
,L.CreateDate
...
June 16, 2010 at 7:28 am
Your error clearly states that it did happen in TRA_BrokenSalesPROCV2
How you think providing the TRA_BrokenSalesPROCV6 noodles will help to identify the problem, it does not use the SUBSTRING function...
June 16, 2010 at 7:20 am
:w00t::w00t::w00t:Cursor?:w00t::w00t::w00t:
Why would you need to use a cursor here?
June 16, 2010 at 7:01 am
You don't want to display the same login multiple times? Try:
-- SETUP:
/*
CREATE TABLE USER_SESSION(
USER_NUM int NOT NULL,
LOGIN_DT datetime NOT NULL,
LOGOUT_DT datetime NULL,
USER_LOCATION varchar(4000) NULL,
)
INSERT INTO USER_SESSION values(228,'2009-10-21 15:37:35.000','2009-10-21 16:34:26.000','192.168.3.126')
INSERT INTO...
June 16, 2010 at 4:09 am
Test your code before posting it!
try:
CREATE TABLE #Test
(
EmployeeID Int,
LogTime DateTime
)
INSERT INTO #Test
select 1001, '01/01/2010 10:22:36'
union select 1002, '01/01/2010 10:24:37'
union select 1003, '01/01/2010 10:24:38'
union select 1001, '01/01/2010 10:24:39'
union select...
June 15, 2010 at 10:45 am
And what is wrong with query I've posted? It does exactly that, if not show the example of data it misses.
If you don't want to waste yours and others time....
June 15, 2010 at 10:22 am
You are welcome!
June 15, 2010 at 10:14 am
He must be the best student in his year if he provides the homework made by SSC community... :hehe:.
Having such DBA in the company helps a lot! As it...
June 15, 2010 at 10:12 am
2Tall (6/15/2010)
In the formula below the values calculated manually are as follows:
SUM of ActualCapacityMinutes = 1010
SUM of ActivityCentreCapacity = 3465
=IIF(Sum(ROUND(Fields!ActualCapacityMinutes.value/Fields!ActivityCentreCapacity.Value,0))*100...
June 15, 2010 at 10:07 am
Both of the solutions givenm whould produce list of duplicates. If it's not what you wanted it is due to your question is unclear as posted.
Please provide table setup script,...
June 15, 2010 at 9:56 am
try:
;WITH JobSum
AS
( SELECT t1.GroupID
,t1.WeekEnding
,SUM(t2.TotalHours) as...
June 15, 2010 at 9:51 am
;WITH Dups
AS
(
SELECT productname, colorcode, categoryname, brandname, colorname
FROM [dbo].[productscolortb_withsize]
GROUP BY productname, colorcode, categoryname, brandname, colorname
...
June 15, 2010 at 9:23 am
scott.pletcher (6/15/2010)
June 15, 2010 at 8:51 am
Viewing 15 posts - 2,746 through 2,760 (of 2,894 total)