Showing posts with label form. Show all posts
Showing posts with label form. Show all posts

Friday, March 30, 2012

Need help converting a CHAR into a Datetime

I have a Database which is having a Counterdate time Column stored in the form of Char(24)

But i need it to be in form of datetime so that i can use the datetime functions on it..When i use the cast or convert inside the function where i am passing this character it gives me error

"Conversion failed when converting datetime from character string."

I am done all permutatiions and combinations for this used

Set @.DE = convert ( datetime, @.ts,121)

Set @.de = cast( @.ts as datetime)

BUT ALWZ give me same error.... also when i copy the whole of the data table into some other database the error doesnt come.. i converts the character into the datetime..

I DONT understand why the Server is behaving wiered..

Hoping to get an answer soon.

With regards

Sharad

Database Developer ,

UIC

Hi Sharad,

Can you post a sample of the (character) data that is causing the issue?

Thanks,

Rob

|||

Sir,

I am just using the performance Logs of the a server and in that the database get automatically generated and hence..

I get the data of datetime column in Char(24) form.. and when i use an function to convert that into a datetime form it gives me error..

take anytime .e.g of the form

"2006-11-15 17:33:22.015"

if this is the time stamp and stored in the char(24) format and I want it to be datetime ...

What any sensible person would do

1. cast it into datetime

2. Convert into datetime..

Both not working ..

With regards

Sharad

|||

PLZ reply if u could Help with this simple STUFF

This CODE I RUN

DECLARE @.DS char(24)

SEt @.ds = '2006-10-27 20:01:13.297'

print @.ds

declare @.de datetime

Set @.de = convert(datetime, @.ds, 121)

print @.de

Output is

:::

2006-10-27 20:01:13.297

Oct 27 2006 8:01PM

But i want output to be exactly same

as 2006-10-27 20:01:13.297

Plz help me with this..

|||

change your statement as below,

DECLARE @.DS char(24)

SEt @.ds = '2006-10-27 20:01:13.297'

print @.ds

declare @.de datetime

Set @.de = convert(datetime, @.ds, 121)

print convert(varchar, @.ds, 121)

Friday, March 23, 2012

Need DW/AS Evangelism information

I have recently created cubes using the company I work
for data. I would like to switch form using Crystal
Reports to using AS and Reporting Services.
However I am not the greatest public speaker. Does anyone
know where I can find a few good web pages that will help
to convince my bosses that using AS is the way to go as
well as Reporting Services. In other words I need to
become a Data Warehouse Evangelist.
Can I get an Amen from the congregation.
(the following questions can be asked by your "opponents")
Why do you want to change a working technology in your company?
if CR is used and works fine, why changing to a new technology?
What are the costs advantages?
What we can't do today and we will do with a DW?
Using a reporting solution does not need datawarehouse, today a lot of
reports can be generated directly from an operationnal system. So if you ask
for a datawarehouse solution, is that because you want to provide more power
and new features to your users, so its a good argument for you.
Providing ad-hoc analysis features is a good point which required a
datawarehouse. And using this datawarehouse for the end users reports is
important to make sure that everyone will see the same cleansed information.
But does your user really need ad-hoc access?
If a user open 1 report by month, too bad. If a user asked you for a new
report every day, you have found the solution.
Crystal report cannot be compared to analysis services and a datawarehouse
solution!
So switching from a simple reporting solution to an ad-hoc query solution
based on OLAP cubes + reports is not allways simple. You'll win only if your
boss need to have answers to questions and if today these answers takes a
long process.
No added value, you'll loose.
Find a guy who need this type of solution in your company (like a HR analyst
or financial manager...) and this person will help you to promote your idea.
No sponsor, no success.
From my experience, if you found a process improoved by a datwarehouse
solution, you win.
In my job, I have reduced the time to create the budget from 2 months to
1week.
I have provided near real time access to information only available only 1
time a day before, and with a higher data quality (in a manufacturing
company).
In another hand, I have projects failure: too complex system not used by the
end user is the first reason. Data not needed by the end user in the
datawarehouse. Bad change management following the project=not used project.
Be prepared for a lot of questions is your better way to win.
Propose a prototype is also a good way to convince you boss, if they can
compare the old and new version of their job, they promote you :-)
"Phil396" <anonymous@.discussions.microsoft.com> wrote in message
news:0aa801c52bfc$c6e5f780$a501280a@.phx.gbl...
>I have recently created cubes using the company I work
> for data. I would like to switch form using Crystal
> Reports to using AS and Reporting Services.
> However I am not the greatest public speaker. Does anyone
> know where I can find a few good web pages that will help
> to convince my bosses that using AS is the way to go as
> well as Reporting Services. In other words I need to
> become a Data Warehouse Evangelist.
> Can I get an Amen from the congregation.
>

Need DW/AS Evangelism information

I have recently created cubes using the company I work
for data. I would like to switch form using Crystal
Reports to using AS and Reporting Services.
However I am not the greatest public speaker. Does anyone
know where I can find a few good web pages that will help
to convince my bosses that using AS is the way to go as
well as Reporting Services. In other words I need to
become a Data Warehouse Evangelist.
Can I get an Amen from the congregation.(the following questions can be asked by your "opponents")
Why do you want to change a working technology in your company?
if CR is used and works fine, why changing to a new technology?
What are the costs advantages?
What we can't do today and we will do with a DW?
Using a reporting solution does not need datawarehouse, today a lot of
reports can be generated directly from an operationnal system. So if you ask
for a datawarehouse solution, is that because you want to provide more power
and new features to your users, so its a good argument for you.
Providing ad-hoc analysis features is a good point which required a
datawarehouse. And using this datawarehouse for the end users reports is
important to make sure that everyone will see the same cleansed information.
But does your user really need ad-hoc access?
If a user open 1 report by month, too bad. If a user asked you for a new
report every day, you have found the solution.
Crystal report cannot be compared to analysis services and a datawarehouse
solution!
So switching from a simple reporting solution to an ad-hoc query solution
based on OLAP cubes + reports is not allways simple. You'll win only if your
boss need to have answers to questions and if today these answers takes a
long process.
No added value, you'll loose.
Find a guy who need this type of solution in your company (like a HR analyst
or financial manager...) and this person will help you to promote your idea.
No sponsor, no success.
From my experience, if you found a process improoved by a datwarehouse
solution, you win.
In my job, I have reduced the time to create the budget from 2 months to
1week.
I have provided near real time access to information only available only 1
time a day before, and with a higher data quality (in a manufacturing
company).
In another hand, I have projects failure: too complex system not used by the
end user is the first reason. Data not needed by the end user in the
datawarehouse. Bad change management following the project=not used project.
Be prepared for a lot of questions is your better way to win.
Propose a prototype is also a good way to convince you boss, if they can
compare the old and new version of their job, they promote you :-)
"Phil396" <anonymous@.discussions.microsoft.com> wrote in message
news:0aa801c52bfc$c6e5f780$a501280a@.phx.gbl...
>I have recently created cubes using the company I work
> for data. I would like to switch form using Crystal
> Reports to using AS and Reporting Services.
> However I am not the greatest public speaker. Does anyone
> know where I can find a few good web pages that will help
> to convince my bosses that using AS is the way to go as
> well as Reporting Services. In other words I need to
> become a Data Warehouse Evangelist.
> Can I get an Amen from the congregation.
>

Monday, March 19, 2012

Need an expression format to put decimals .00

I have the following field(Fields!SequenceNO.Value), coming form database.

i would like to have an expression IIF...

if the value coming from database is just 1, then make it 1.00 or

if the value coming from database has a period or point say 1.01 then show as it is.

thank you very much for the help / information....

Hello,

You can do this a couple different ways...

1. Select your textbox that will hold Fields!SequenceNO.Value, then change the Format property to #.00

or

2. Replace Fields!SequenceNO.Value with the expression: =Format(Fields!SequenceNO.Value, "#.00")

Both of these will make all of your numbers in the column have 2 decimals.

Hope this helps.

Jarret