Viewing 15 posts - 691 through 705 (of 1,048 total)
very nice question as doesn't know much about OUTPUT clause 🙂
February 27, 2013 at 6:17 am
easy one for the Tuesday....
As there was no question on Monday so I was expecting some Tricky question today 😛 :hehe:
February 25, 2013 at 10:08 pm
can you plz send the script the you are using for this?
February 22, 2013 at 2:05 am
Ok
then my suggestion is to store words in separate rows so that you can perform operation LIKE as you mentioned.
February 21, 2013 at 5:47 am
Hi,
It depends on your requirement. If you to perform any operation on those words later like update etc. then its better you store those 70K words in 70K rows...
February 21, 2013 at 4:48 am
try this too....
;WITH mycte AS (
SELECT iCalendarDatCategoryID,vcCalendarCategoryCode,iSchoolYearCode,dtCalendarDay,
ROW_NUMBER() OVER(PARTITION BY iCalendarDatCategoryID ORDER BY dtCalendarDay) AS rn
FROM #Temp1
)
SELECT iSchoolYearCode, min(dtCalendarDay) as [Quarter Start Day], max(dtCalendarDay) as...
February 20, 2013 at 11:13 pm
you can try this one now...
;with cte as
(
SelectiSchoolYearCode
,dtCalendarDay
,iCalendarDatCategoryID
,vcCalendarCategoryCode
,ROW_NUMBER() OVER(Partition By iSchoolYearCode, iCalendarDatCategoryID Order by dtCalendarDay) RowNumber
From#Temp1
)
SelectiSchoolYearCode
,Max(Case
When vcCalendarCategoryCode = 'Quarter Start Day' Then dtCalendarDay
End) As [Quarter Start]
,Max(Case
When vcCalendarCategoryCode = 'Quarter Grade...
February 20, 2013 at 11:05 pm
try this.. hope it will work
SELECT
iSchoolYearCode,
CASE WHEN vcCalendarCategoryCode = 'Quarter Start Day' THEN dtCalendarDay ELSE 0 END AS QuarterStartDay,
CASE WHEN vcCalendarCategoryCode = 'Quarter Grade Closing' THEN dtCalendarDay...
February 20, 2013 at 10:12 am
I was also going to write the script with using UNION ALL as yogi already described...
i think you get your answer now 😛
February 20, 2013 at 2:55 am
you can also do backup and restore through a sql query...
Backup
Backup Database db_name
TO DISK = 'path of the location'
WITH FORMAT
RESTORE DATABSE db_name
FROM DISK = 'path where your databse file is...
February 19, 2013 at 11:26 pm
Viewing 15 posts - 691 through 705 (of 1,048 total)