Viewing 15 posts - 2,611 through 2,625 (of 3,544 total)
SELECT REPLACE(STR(748,6,0),' ','0')
Far away is close at hand in the images of elsewhere.
Anon.
June 10, 2004 at 7:30 am
select count(distinct SerialNumber),sum(cast(Direct as int)),
(sum(cast(Direct as int)) * 100) / count(distinct SerialNumber)
from TestInput
group by DateEntered
Note: Direct count is all direct including non distinct Serial number !!
Far away is close at hand in the images of elsewhere.
Anon.
June 10, 2004 at 7:26 am
A bit clearer but can u post ddl of NAMSYSHTMLFORMS and SMSYSBASEVIEWDATA tables with data that would match with your example
Example:FPKColumn="1" datatype="int"> <INPUT id=8 style="VISIBILITY: hidden" name=8 DEType="78"
Far away is close at hand in the images of elsewhere.
Anon.
June 10, 2004 at 7:16 am
I agree with what Kenneth wrote.
Without looking deeply into the query, it looks like you want to rollup a grouping of a calc based on the count of that grouping.
The...
Far away is close at hand in the images of elsewhere.
Anon.
June 10, 2004 at 7:08 am
Can you be more specific, what text is the primary key, sequence number. What tables & columns and what do you want to join it with?
Some example of required output...
Far away is close at hand in the images of elsewhere.
Anon.
June 10, 2004 at 6:54 am
Or this way
delete suwp
from sysuser_webpage suwp
inner join webpage wp
on wp.webpage_uuid = suwp.webpage_uuid
and wp.state_code IN ('CT', 'NH')
where suwp.sysuser_id = '2'
sometimes joins run better than using...
Far away is close at hand in the images of elsewhere.
Anon.
June 9, 2004 at 6:57 am
DECLARE @datestr char(6)
SET @datestr = '060904'
SET DATEFORMAT mdy
SELECT CAST(STUFF(STUFF(@datestr,5,0,'/'),3,0,'/') as datetime)
Far away is close at hand in the images of elsewhere.
Anon.
June 9, 2004 at 6:49 am
Check the Default Language on the logins. It affects date format.
Far away is close at hand in the images of elsewhere.
Anon.
June 9, 2004 at 5:57 am
| The next thing I have to figure out with it is that the customer told us this morning,... |
Far away is close at hand in the images of elsewhere.
Anon.
June 9, 2004 at 2:11 am
I forgot to mention the the result and it's type is based on the types used in the calculation, as above any calcualtion using two ints will produce an int.
It is...
Far away is close at hand in the images of elsewhere.
Anon.
June 8, 2004 at 7:04 am
Because sql converts the numbers to ints
so
SELECT 330 / 60
is the same as
SELECT CAST(330 as int) / CAST(60 as int)
You need to tell sql that one of the number...
Far away is close at hand in the images of elsewhere.
Anon.
June 8, 2004 at 6:53 am
Antares' solution is very similar to mine which was based on your first post and was only interested in assets that were 'IN'. Your example report was split by date.
Far away is close at hand in the images of elsewhere.
Anon.
June 8, 2004 at 3:38 am
select
BORR.fico as borr1fico,
BORR2.fico as borr2fico,
BORR3.fico as borr3fico,
a1.street as borr1street,
a1.city as borr1city,
a1.state as borr1state,
a2.street as borr2street,
a2.city as borr2city,
a2.state as borr2state,
a3.street as...
Far away is close at hand in the images of elsewhere.
Anon.
June 7, 2004 at 6:50 am
DECLARE @SDate smalldatetime, @EDate smalldatetime
SET @SDate = '2004-06-01'
SET @EDate = '2004-06-05'
SELECT d.ReportDate,
SUM(CASE WHEN a.DeviceType = 'Monitor'
THEN 1 ELSE 0 END) as [Monitors],
SUM(CASE WHEN a.DeviceType...
Far away is close at hand in the images of elsewhere.
Anon.
June 4, 2004 at 7:46 am
select a.TktNbr, a.[Current Status] as [Status],
DATEADD(second,SUM(DATEDIFF(second,a.[Date Created],ISNULL(n.[Date Created],GETDATE()))),'') as [Time In]
from (select ID, TktNbr, [Previous Status], [Current Status], [Date Created]
,(select min(ID) as [ID] from #BaseTable b2 where...
Far away is close at hand in the images of elsewhere.
Anon.
June 3, 2004 at 7:40 am
Viewing 15 posts - 2,611 through 2,625 (of 3,544 total)