Showing posts with label period. Show all posts
Showing posts with label period. Show all posts

Tuesday, March 20, 2012

Case in SqlServer

Hi,
I have a table and field below.

Payroll table
Id Period Net_pay
001 010105 5000
001 011605 300
001 030105 1000
001 040105 150
002 010105 1000
002 011505 500

I want the display like this if posible.. The first to character of the field period is the Month January to December.
Id January February March April ...........
001 5300 00 1000 150 ..........
002 1500 00 00 00 .............

Thank...You want a CROSSTAB query. Look it up in Books Online and you will get as good an explanation of how to do this as you could get on this forum.

Your only challenge should be converting the numeric string date format to the MonthName columns you want. You will need to do a CONVERT, CAST, or some other function, depending upon whether you have to worry about spanning years or not.|||Thanks Mr. Blindman for the reply...

Case Function on a Cell

Hi all,
have a Matrix-based report that tracks project's %complete by period id for a
particular year, as follows:
- 2005
---
01 02 03 04 05 06 07 08 09 10 11 12
project1 10% 12% 18% 25% 38% 52%
project2 13% 29% 68% 89% 100%
project3 25% 68% 100%
:
:
:
I need to know how to change the header grop of Period_id "J F M A M J J A S
O N D" instead of "01 02 03 04 05 06 07 08 09 10 11 12" inside a statement
in the report, since i can not control the sql statement that feeds the
report.
Thank you in advance
Tony
--
Message posted via http://www.sqlmonster.comHave a look at my reply for "Proper syntax of CASE()" etc - in other words
write a little VB .net function in the Report's code box, then call the
funtion to return a string value
"Antony Altobelli via SQLMonster.com" wrote:
> Hi all,
> have a Matrix-based report that tracks project's %complete by period id for a
> particular year, as follows:
> - 2005
> ---
> 01 02 03 04 05 06 07 08 09 10 11 12
> project1 10% 12% 18% 25% 38% 52%
> project2 13% 29% 68% 89% 100%
> project3 25% 68% 100%
> :
> :
> :
> I need to know how to change the header grop of Period_id "J F M A M J J A S
> O N D" instead of "01 02 03 04 05 06 07 08 09 10 11 12" inside a statement
> in the report, since i can not control the sql statement that feeds the
> report.
> Thank you in advance
> Tony
> --
> Message posted via http://www.sqlmonster.com
>

Sunday, February 12, 2012

Can't upgrade evaluation to retail

Hi,
I bought retail SQL server from CDW. I just realized my evaluation period
was overed from application logs. I followed the instructions
http://support.microsoft.com/default.aspx?scid=kb;en-us;281574 ; during the
installation, I select "upgrade, remove, ...." and following the
instructions and somehow "Upgrade your existing installation" is gray out.
Do you have to upgrade to retail before evalution is over? Any tips and
information will be appreicated.
Thank you in advance,
Johnny ChowJohnny,
Just a thought...what edition are you trying to upgrade to? Valid upgrade?
Might try running:
SELECT SERVERPROPERTY('EDITION'), SERVERPROPERTY('ENGINEEDITION')
to get more information. Also, make sure your OS supports the version of
SQL Server being used.
HTH
Jerry
"Johnny Chow" <jchow10@.gmail.com> wrote in message
news:Odvjv320FHA.1564@.tk2msftngp13.phx.gbl...
> Hi,
> I bought retail SQL server from CDW. I just realized my evaluation period
> was overed from application logs. I followed the instructions
> http://support.microsoft.com/default.aspx?scid=kb;en-us;281574 ; during
> the installation, I select "upgrade, remove, ...." and following the
> instructions and somehow "Upgrade your existing installation" is gray out.
> Do you have to upgrade to retail before evalution is over? Any tips and
> information will be appreicated.
> Thank you in advance,
> Johnny Chow
>|||Hi,
I am not DB administrator. Forgive me, if I ask dumb question. I really
like to find out the version that I was running. What command do I use to
get into SQL prompt? MSSQL serverice is not start due to eval expiration
and can I use still able to get into sql prompt and make query?
Thank you in advance,
Johnny Chow
"Jerry Spivey" <jspivey@.vestas-awt.com> wrote in message
news:%23B%23OS$20FHA.464@.TK2MSFTNGP15.phx.gbl...
> Johnny,
> Just a thought...what edition are you trying to upgrade to? Valid
> upgrade? Might try running:
> SELECT SERVERPROPERTY('EDITION'), SERVERPROPERTY('ENGINEEDITION')
> to get more information. Also, make sure your OS supports the version of
> SQL Server being used.
> HTH
> Jerry
> "Johnny Chow" <jchow10@.gmail.com> wrote in message
> news:Odvjv320FHA.1564@.tk2msftngp13.phx.gbl...
>> Hi,
>> I bought retail SQL server from CDW. I just realized my evaluation
>> period was overed from application logs. I followed the instructions
>> http://support.microsoft.com/default.aspx?scid=kb;en-us;281574 ; during
>> the installation, I select "upgrade, remove, ...." and following the
>> instructions and somehow "Upgrade your existing installation" is gray
>> out. Do you have to upgrade to retail before evalution is over? Any tips
>> and information will be appreicated.
>> Thank you in advance,
>> Johnny Chow
>|||I've got exactly the same problem on my end. I have SQL Server 2000
Enterprise Evaluation installed and expired and am trying to apply the SQL
Server 2000 Enterprise Retail version.
The option to Upgrade an Existing installation is greyed out just as
described. Any suggestions?
"Johnny Chow" wrote:
> Hi,
> I am not DB administrator. Forgive me, if I ask dumb question. I really
> like to find out the version that I was running. What command do I use to
> get into SQL prompt? MSSQL serverice is not start due to eval expiration
> and can I use still able to get into sql prompt and make query?
> Thank you in advance,
> Johnny Chow
> "Jerry Spivey" <jspivey@.vestas-awt.com> wrote in message
> news:%23B%23OS$20FHA.464@.TK2MSFTNGP15.phx.gbl...
> > Johnny,
> >
> > Just a thought...what edition are you trying to upgrade to? Valid
> > upgrade? Might try running:
> >
> > SELECT SERVERPROPERTY('EDITION'), SERVERPROPERTY('ENGINEEDITION')
> >
> > to get more information. Also, make sure your OS supports the version of
> > SQL Server being used.
> >
> > HTH
> >
> > Jerry
> > "Johnny Chow" <jchow10@.gmail.com> wrote in message
> > news:Odvjv320FHA.1564@.tk2msftngp13.phx.gbl...
> >> Hi,
> >> I bought retail SQL server from CDW. I just realized my evaluation
> >> period was overed from application logs. I followed the instructions
> >> http://support.microsoft.com/default.aspx?scid=kb;en-us;281574 ; during
> >> the installation, I select "upgrade, remove, ...." and following the
> >> instructions and somehow "Upgrade your existing installation" is gray
> >> out. Do you have to upgrade to retail before evalution is over? Any tips
> >> and information will be appreicated.
> >>
> >> Thank you in advance,
> >>
> >> Johnny Chow
> >>
> >
> >
>
>