Viewing 15 posts - 5,761 through 5,775 (of 10,144 total)
Potso (8/31/2012)
August 31, 2012 at 6:54 am
Eugene Elutin (8/31/2012)
dwain.c (8/31/2012)
Eugene Elutin (8/31/2012)
draw Mona Lisa using T-SQL (I remember I had seen assembler application which would print out...
August 31, 2012 at 6:52 am
Eugene Elutin (8/31/2012)
...draw Mona Lisa using T-SQL...
Okay.
SELECT *
FROM (
SELECT '......................' UNION ALL
SELECT '......................' UNION ALL
SELECT '......########........' UNION ALL
SELECT '.....##...#.###.......' UNION ALL
SELECT '.....#..#...###.......' UNION ALL
SELECT '.....#..##..###.......' UNION...
August 31, 2012 at 6:15 am
renvilo (8/31/2012)
...So in short, how do I count how many shift there was from breaking time to fixing time with my #Final temp table and my Shifts table?...
Start by setting...
August 31, 2012 at 5:58 am
denis.gendera (8/31/2012)
select machine_id, MONTHS =
CASE
WHEN DATEDIFF("m", firstseen, getdate()) = 0 then 'AUG'
...
August 31, 2012 at 5:43 am
Here's another way:
;WITH Locations AS (
SELECT
DATEADD(dd, 0, DATEDIFF(dd, 0, createdate)) AS createdate,
COUNT(DATEADD(dd, 0, DATEDIFF(dd, 0, createdate))) AS totalcount,
sum(case channel when 'website' then 1 else 0 end) as WebsiteViews,
sum(case channel...
August 31, 2012 at 4:10 am
You will need to set up some sample data for this, there's a link in my sig to a great article which shows you how it's done.
Without knowing how...
August 31, 2012 at 3:43 am
You don't appear to need dynamic sql for this:
SELECT
--app.id,
edit.project_name
FROM tracker app
INNER JOIN edit edit
ON app.id=edit.id
WHERE edit.project_name LIKE ('%' + REPLACE(@project_name,'*','%') + '%')
August 31, 2012 at 3:14 am
sivajii (8/31/2012)
[1|cricket, 1| bowling&fielding, 2| batting] [2|football, 4| foul]
but the out put should be like...
August 31, 2012 at 2:42 am
fredriksv80 (8/31/2012)
...I have an index on col. Is it bad to update a column used in the where clues?...
No, the entire set of rows matching the search predicates are identified...
August 31, 2012 at 2:08 am
Check the collation of the target column - it may be different from the database default.
August 30, 2012 at 9:44 am
RBarryYoung (8/30/2012)
Geez, I go to bed, get up, and there's twenty new posts!...
Have you checked the date today Barry? 😛
August 30, 2012 at 9:15 am
RBarryYoung (8/30/2012)
August 30, 2012 at 9:09 am
dwain.c (8/30/2012)
ChrisM@Work (8/30/2012)
SELECTm.[Definition],
d.TABLE_NAME
FROM sys.sql_modules m
OUTER APPLY (
SELECT TABLE_NAME
FROM YourDatabase.INFORMATION_SCHEMA.TABLES t
WHERE m.definition LIKE '%'+t.TABLE_NAME+'%'
GROUP BY TABLE_NAME
) d
Edit: changed db name
A man of few words! I...
August 30, 2012 at 8:15 am
SELECT
m.[Definition],
d.TABLE_NAME
FROM sys.sql_modules m
OUTER APPLY (
SELECT TABLE_NAME
FROM YourDatabase.INFORMATION_SCHEMA.TABLES t
WHERE m.definition LIKE '%'+t.TABLE_NAME+'%'
GROUP BY TABLE_NAME
) d
Edit: changed db name
August 30, 2012 at 7:47 am
Viewing 15 posts - 5,761 through 5,775 (of 10,144 total)