Forum Replies Created

Viewing 15 posts - 691 through 705 (of 1,048 total)

  • RE: SETTINGS - 1

    Thanks Hugo for the explanation

  • RE: SETTINGS - 1

    good basic question to start the week 🙂

    +1

  • RE: OUTPUT - 1

    very nice question as doesn't know much about OUTPUT clause 🙂

  • RE: Creating Tables 2

    easy one for the Tuesday....

    As there was no question on Monday so I was expecting some Tricky question today 😛 :hehe:

  • RE: Date time conversion error

    can you plz send the script the you are using for this?

  • RE: Best way to store data in table

    Ok

    then my suggestion is to store words in separate rows so that you can perform operation LIKE as you mentioned.

  • RE: Best way to store data in table

    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...

  • RE: Query Help

    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...

  • RE: Query Help

    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...

  • RE: Query Help

    ok i didnt ran that query..

    lemme try again

  • RE: Query Help

    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...

  • RE: Query Help

    you can do this using CASE also..

  • RE: SubQuery returns more than 1 value

    good one micky....

  • RE: Query Help

    I was also going to write the script with using UNION ALL as yogi already described...

    i think you get your answer now 😛

  • RE: Backing up & Restoring a DB

    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...

Viewing 15 posts - 691 through 705 (of 1,048 total)