Forum Replies Created

Viewing 15 posts - 9,301 through 9,315 (of 15,381 total)

  • RE: User Defined Table type

    JKSQL (2/13/2013)


    When you say "could be stored in the Tempdb" that is because a user defined table type is technically memory driven verse disk driven like #temp table?

    Take a look...

  • RE: User Defined Table type

    JKSQL (2/13/2013)


    I just can't seem to find an article in how User Defined table types are stored. Do these go into the TempDb? Also is there an advantage...

  • RE: How to get all Childs and subchilds of a parent

    anilkumar04_b (2/13/2013)


    Hi All,

    I need an urgent help to build some logic in Oracle DB.

    I have a table called TREE and in that we have data based on hierarchies.

    We have columns...

  • RE: Convert Varchar to Decimal

    raguyazhin (2/13/2013)


    Data's are not a problem because this query ran when i transferred the this single column data's to another table.

    but error came on the original table only.

    both column...

  • RE: How to calculate total working hours of all the employees in specified dates.

    Please read the link in my signature about best practices when posting questions. We don't need 75k rows of data in a text file. We need to have create table...

  • RE: Naming Convention for UDF's, Views and SP's

    RonKyle (2/13/2013)


    Also, it's extremely inconsistent unless you also name all your tables tblXXX (and DO NOT, EVER, do that, ).

    Why would you never do this? I've seen dimension tables...

  • RE: Case Statement Issue

    wafw1971 (2/12/2013)


    Site Table

    Site_SkeySiteCodeSiteNameBDMRegionSiteWeighting

    16000AdgestoneRoger GreenEast1

    26001Aldridge HillRoger GreenEast4

    36002Alton The StarRoger GreenEast4

    46003ArdgartenRoger GreenEast1

    56004AshbourneRoger GreenEast1

    66005AshurstRoger GreenEast1

    76006BakewellRoger GreenEast2

    86007BalaRoger GreenEast1

    96008Barnard CastleRoger GreenEast3

    106009Beadnell BayRoger GreenEast2

    Site Table

    PitchType_SkeyPitchTypeCodePitchDescriptionPitchTypeWeighting

    11Grass4

    22Grass With Electric3

    33Hardstanding2

    44Hardstanding With Electric4

    55Self Catering1

    66Pods/Dens1

    77Seasonal1

    It was in table form but it...

  • RE: Case Statement Issue

    You really don't need all those subselects at all. How about something like this?

    SELECT

    case Site_Key

    when 1 then

    CASE YEAR(@StartDate)

    WHEN 2010 THEN '1 May 2010'

    WHEN 2011 THEN 'StartDate 2011'

    WHEN 2012 THEN...

  • RE: Sorting Issue

    U.T (2/12/2013)


    Attached are the current and required output screen shots. Note that i have created the required output in excel 🙂

    I had a feeling that was what you were looking...

  • RE: compare varchar dates

    dubem1-878067 (2/12/2013)


    Sean Lange (2/12/2013)

    You don't have to explicitly convert all 3 but you DO have to force it to datetime.

    where convert(datetime, mydatecolumn, 120) between '2012-10-10' and '2013-04-01'

    Will this...

  • RE: Extracting xml data from text column

    davidsalazar01 (2/12/2013)


    Hi,

    Did you ever get an answer/solution on this topic? I have the same issue and don't know the answer.

    Please let me know.

    Thanks!

    -Dave

    This thread is 2 1/2 years old....

  • RE: Sorting Issue

    U.T (2/12/2013)


    Thanks Lowell. Unfortunately not, it still does not group them together.

    There should always be an outgoing after an incoming, and we need to make sure both are of same...

  • RE: Get the substring after second white space

    newbie2 (2/12/2013)


    Is there a way to get the first two? For instance I need to pull out 'aabbbb' from 'aa bbbb c ddd ee'. The lengths and the number of...

  • RE: compare varchar dates

    dubem1-878067 (2/12/2013)


    I have a varchar column containing dates (not my design) with this format 2013-02-12

    I need to extract records between two dates

    this code will do the job

    where convert(datetime,...

  • RE: Query Help

    This closer maybe...

    SELECT cStudentID

    ,cGradeCode

    ,a.iSchoolYearCode

    , case when cGradeCode in ('09', '10', '11', '12')

    then x.iSchoolYearCode

    else 0

    end

    FROM #temp a

    cross apply (select max(iSchoolYearCode) + 1 as iSchoolYearCode from #temp where cStudentID = a.cStudentID and...

Viewing 15 posts - 9,301 through 9,315 (of 15,381 total)