I need Sql Query Like This

Posted by Jayakumars under Regular Expressions on 7/19/2011 | Points: 10 | Views : 1492 | Status : [Member] [MVP] | Replies : 4
hi
i need output this is my sql statement- Below attach my image
Select Day1,Day2,Day3,Day4,Day5,Day6,Day7,Day8,Noofwrkdays from tbl1

I need output
here show Day8
i need currentday and below record value only calculate
to assign noofwrkdays how to change this Query.

Mark as Answer if its helpful to you


Responses

Posted by: Vuyiswamb on: 7/19/2011 [Member] [MVP] [Administrator] NotApplicable | Points: 25

Up
0
Down
It is either your answer is very simple, or i understood the problem, please explain clearly

Thank you for posting at Dotnetfunda
[Administrator]

Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: RaviRanjanKr on: 7/19/2011 [Member] Starter | Points: 25

Up
0
Down
hey! first please remove your email id because it not a good idea to put email id in forum while asking question. its may lead you to some problem. and hey Jayakumars please be more specific while asking question. your question is not making any sense to me.

Thanks
Ravi Ranjan Kumar
http://raviranjankr.wordpress.com

Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jayakumars on: 7/19/2011 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi
Ravi
i have 31 column in a table like this Day1,Day2,Day3....... ,nowrkdays
i need day1 to current day value enough
for example to day dayvalue - 19
i need sum day1,day2+...day19 to assign nowrkdays field but my day1 field is varchar how will do this

this is correct do u understood Mr.RaviRajanKR


Mark as Answer if its helpful to you

Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: RaviRanjanKr on: 7/19/2011 [Member] Starter | Points: 25

Up
0
Down
hey! I assume you have entered specific date in your all Column like day1,day2.. if so then to adding these days you can use given query
select day(day1)+day(day2)+day(day3)+.. from tablename

it will return the sum of day from all days values.
Hope I've answered according to your requirement. if you have any other query else so please feel free to revert back :)



Thanks
Ravi Ranjan Kumar
http://raviranjankr.wordpress.com

Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response