Forum Replies Created

Viewing 15 posts - 1 through 15 (of 17 total)

  • RE: How to get results from a table dynamically

    Sean Lange (9/9/2011)


    ash0550 (9/9/2011)


    I want to retrive data from a table dynamically.

    Say it contains 3 rows name,age and gender

    I want to retrieve name and gender through age.

    Instead of using Select...

  • RE: FIRST FUNCTION

    Lowell (6/22/2011)


    the FIRST function is an access function, and doesn't have a true equivilent in SQL server...the best you can do is TOP 1...ORDER BY

    Thanks it worked

  • RE: Sum of numbers in A given field

    Jeremy-475548 (6/21/2011)


    could be done mathematically too:

    Declare @number int, @acc int

    select @number = 219, @acc = 0

    while 1=1

    Begin

    set @acc = @acc + @number % 10 ; set @number...

  • RE: Sum of numbers in A given field

    thank u

  • RE: Sum of numbers in A given field

    Steve Jones - SSC Editor (6/21/2011)


    Out of curiosity, why do you need to do this?

    Its dam easy when u do that in Java or C. But I dont even get...

  • RE: How to get the number of hours Working

    oops thats a bit stupid one. I didnt check the brackets properly.

    Actually I am trying to design a query that would allocate the number of hours per month based on...

  • RE: How to get the number of hours Working

    Could you tell me where did you do that multiplication I mean the Query

  • RE: USING CASE

    opc.three (6/16/2011)


    ash0550 (6/16/2011)


    Nope it is not working

    Anyways thanks

    It may not be "working" because only you can see your screen. Please provide sample DDL and DML as well as your expected...

  • RE: USING CASE

    ColdCoffee (6/16/2011)


    ash0550 (6/16/2011)


    Say the number of ID below 100 are 67 then in the result 67 should be displayed

    u want all the 67 rows to have the row count value?

    As...

  • RE: USING CASE

    Ninja's_RGR'us (6/16/2011)


    ash0550 (6/16/2011)


    select BillOfMaterialsID,

    case when BillOfMaterialsID <= 100 then 'Cheap'

    When BillofMaterialsID between 101 and 500 then 'Medium'

    When BillofMaterialsID between 501 and 1000 then 'HIGH'

    When BillofMaterialsID between 1001...

  • RE: USING CASE

    select BillOfMaterialsID,

    case when BillOfMaterialsID <= 100 then 'Cheap'

    When BillofMaterialsID between 101 and 500 then 'Medium'

    When BillofMaterialsID between 501 and 1000 then 'HIGH'

    When BillofMaterialsID between 1001 and 3000...

  • RE: USING CASE

    Nope it is not working

    Anyways thanks

  • RE: How to get firstname and Lastname in the same coulmn without any separator

    oh thanks for that.

    I got it too before I specified a comma so it was not showing up

    Anyways thanks again

  • RE: How to get the bottom 10 values in SQLsERVER

    GilaMonster (6/9/2011)


    Please don't post in all caps. It's the online equivalent of shouting at people.

    SELECT TOP (10) <column list>

    FROM <Some tables>

    ORDER BY <column that defines the required ordering> DESC

    Thanks for...

  • RE: UPPERCASE

    wagnerbianchijr (6/9/2011)


    SELECT UPPER('name') as Name

    GO

    => http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=47718%5B/quote%5D

    yup thannks

    it worked

Viewing 15 posts - 1 through 15 (of 17 total)