Viewing 15 posts - 691 through 705 (of 1,048 total)
Thanks Hugo for the explanation
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
March 4, 2013 at 6:20 am
good basic question to start the week 🙂
+1
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
March 3, 2013 at 11:11 pm
very nice question as doesn't know much about OUTPUT clause 🙂
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
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:
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
February 25, 2013 at 10:08 pm
can you plz send the script the you are using for this?
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
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.
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
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...
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
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...
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
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...
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
February 20, 2013 at 11:05 pm
ok i didnt ran that query..
lemme try again
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
February 20, 2013 at 10:35 am
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...
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
February 20, 2013 at 10:12 am
you can do this using CASE also..
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
February 20, 2013 at 10:05 am
good one micky....
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
February 20, 2013 at 2:58 am
I was also going to write the script with using UNION ALL as yogi already described...
i think you get your answer now 😛
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
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...
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
February 19, 2013 at 11:26 pm
Viewing 15 posts - 691 through 705 (of 1,048 total)