Viewing 15 posts - 9,856 through 9,870 (of 10,144 total)
svhanda (4/30/2008)
steveb (4/29/2008)
do you want Education column to be updated to the same value?can you post the table structure and some matching sample data for the other table ?
Hi...
Thanks for...
May 2, 2008 at 9:10 am
karthikeyan (11/22/2007)
May 2, 2008 at 8:01 am
There's another way of doing this:
SELECT dbJobSkillGrp,
SUM(CASE WHEN dbJobCreateDate BETWEEN @StartDate AND @EndDate THEN 1 ELSE 0 END) AS 'JobsCreated',
SUM(CASE WHEN dbJobFillDate BETWEEN @StartDate AND @EndDate THEN 1 ELSE...
May 2, 2008 at 7:47 am
Hi
Here's a suggestion, I'm not sure if it will be sympathetic to your environment but worth a try:
SELECT {col1, Col2, ...Coln}
FROM {Table} a
LEFT JOIN (
SELECT 2 AS Department, 'B'...
April 25, 2008 at 6:33 am
thehollis (4/22/2008)
Example
Department Category1 Category2 ...
April 25, 2008 at 4:56 am
If you are likely to use your cluster code translations again, you could put them into a table and use UPDATE...FROM
CREATE TABLE #TranslateClusterCodes (CLUSTER_CODE char(3), TGI_CLUSTER_CODE char(2))
INSERT INTO #TranslateClusterCodes (CLUSTER_CODE,...
April 23, 2008 at 8:11 am
RyanRandall (4/21/2008)
This uses explicit conversion, rather than implicit[/code]
Chris
I don't see any implicit conversion. Are you suggesting that what I posted is implicit?
Hi Ryan
Not at all - CAST() is explicit conversion....
April 21, 2008 at 7:38 am
This uses explicit conversion, rather than implicit:
DECLARE @CharDate CHAR(23)
SET @CharDate = '20081011192921703'
SET @CharDate = STUFF(STUFF(STUFF(STUFF(STUFF(STUFF(@CharDate, 5, 0, '-'), 8, 0, '-'), 11, 0, ' '), 14, 0, ':'), 17, 0,...
April 21, 2008 at 4:54 am
Have you tried Sergiy's suggestion?
SELECT * FROM (
SELECT RIGHT(SPACE(32) + RTRIM(LTRIM(' 1 ')), 32) AS TradeReference UNION ALL
SELECT RIGHT(SPACE(32) + RTRIM(LTRIM('12345678901234567890123456789012')), 32) UNION ALL
SELECT RIGHT(SPACE(32)...
April 21, 2008 at 4:33 am
Mark Markov (4/17/2008)
I am almost sure that noone who is going to interview me will see this thread. So far...
April 17, 2008 at 8:23 am
If you don't like temp. tables, this is the same code using derived tables:
select a.People_Number, a.Web_Role, d.Web_Role
from #TheTable a, (select a.People_Number,a.Web_Role
from #TheTable a, (select People_Number
from #TheTable
group by People_Number
having count(*)...
April 15, 2008 at 12:44 am
CREATE TABLE #TheTable (People_Number int, Web_Role int)
INSERT INTO #TheTable (People_Number, Web_Role)
SELECT 100, 3 UNION ALL
SELECT 100, 7 UNION ALL
SELECT 200, 5 UNION ALL
SELECT 200, 3 UNION ALL
SELECT 300, 8 UNION...
April 15, 2008 at 12:15 am
karthikeyan (4/14/2008)
Every Database developer should have some thoughts on performance.some people might have worked/faced this kind of situation,if they share their real experience then people like me will get some...
April 14, 2008 at 8:14 am
Davidyard
One step at a time: introduce the aggregate last.
SELECT
[Incident #],
[Urgency ID],
[Group Name],
[Open Date & Time],
[SMDBA_Incident_Age] = DATEDIFF(d, [Open Date & Time], GETDATE())-----ERROR is at this line
FROM [_SMDBA_].[Incident_Age]
-- Is this...
April 14, 2008 at 7:36 am
Viewing 15 posts - 9,856 through 9,870 (of 10,144 total)