Showing posts with label format. Show all posts
Showing posts with label format. Show all posts

Saturday, February 25, 2012

add index

I know someone will refer me to online books, but I did a search on the
microsoft site and can't get to it.
I know the general format for adding an index is:
Alter Table tablename ADD INDEX indexname, type, FieldName
The thing is, I'm not sure what to put in for type? Do I use quotes? Can
someone actually give me an URL to an example that will show?
E. coli Happens.
Message posted via webservertalk.com
http://www.webservertalk.com/Uwe/Forum...amming/200512/1HockeyFan via webservertalk.com wrote:

> I know someone will refer me to online books, but I did a search on
> the microsoft site and can't get to it.
> I know the general format for adding an index is:
> Alter Table tablename ADD INDEX indexname, type, FieldName
> The thing is, I'm not sure what to put in for type? Do I use quotes?
> Can someone actually give me an URL to an example that will show?
Search for CREATE INDEX in BOL.
examples:
CREATE INDEX emp_order_ind
ON order_emp (orderID, employeeID)
CREATE UNIQUE CLUSTERED INDEX employeeID_ind
ON emp_pay (employeeID)
HTH,
Stijn Verrept|||>I know someone will refer me to online books, but I did a search on the
> microsoft site and can't get to it.
SQL 2000:
http://msdn.microsoft.com/library/e...portal_7ap1.asp
SQL 2005:
http://msdn.microsoft.com/en-us/library/ms130214(en-US,SQL.90).aspx

> Alter Table tablename ADD INDEX indexname, type, FieldName
Actually, I'm not sure where you got that syntax, it's...
CREATE [UNIQUE] [NON|CLUSTERED] INDEX
indexname
ON tablename (columnName [DESC] [, ...]);
SQL 2000:
http://msdn.microsoft.com/library/e...create_64l4.asp
SQL 2005:
http://msdn2.microsoft.com/en-us/library/ms188783.aspx

Friday, February 24, 2012

add Date and Time In Non english format(Farsi or arabic)

Please Help me
I want Store date and time in sql server tables but in non english format.
For example Arabic or farsi
How can i Do?
Help meeeeeeeee
ThanksI am not sure which format you want - but there are 2 Kuwaiti formats:

Style Format
130 dd mon yyyy hh:mi:ss:mmmAM
131 dd/mon/yy hh:mi:ss:mmmAM

You can alter your datetime data using the convert function. Look at convert in bol.|||Date and time are not stored in any "format" in the database. They are stored as numeric values indicating the days elapsed since a fixed point in time. What you are looking for is a way to display the datetime value in a particular format. You can use the convert function given by rnealejr when outputing your results, but generally issues of data-formatting and display should be handled by your user interface or reporting tool.

blindman

Sunday, February 19, 2012

Add an export format

I want to add an export option for the report dropdown menus that will allow
users to export reports to tab delimited files. This will allow them to open
up the data of a report directly in excel.
Does anyone know if this can be done?First you can render a report in Excel already using one of the rendering
extensions... You may have the report rendered in excel immediately by
calling the report from a URL passing the rendering extention , or having a
user subscribe to the report in Excel.
However if you really wish to, you may write a new rendering extension which
renders a tab delimited report, and load it into reporting services, and
modify some config files... This is documented in books on line... look for
rendering extensions..
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"DBA72" <DBA72@.discussions.microsoft.com> wrote in message
news:A5CBA5C7-9FA1-40A1-8132-45DC9E838D60@.microsoft.com...
>I want to add an export option for the report dropdown menus that will
>allow
> users to export reports to tab delimited files. This will allow them to
> open
> up the data of a report directly in excel.
> Does anyone know if this can be done?|||Were you able to get this adding to the dropdown menu? -Peter
"Wayne Snyder" wrote:
> First you can render a report in Excel already using one of the rendering
> extensions... You may have the report rendered in excel immediately by
> calling the report from a URL passing the rendering extention , or having a
> user subscribe to the report in Excel.
> However if you really wish to, you may write a new rendering extension which
> renders a tab delimited report, and load it into reporting services, and
> modify some config files... This is documented in books on line... look for
> rendering extensions..
>
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> www.mariner-usa.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
> "DBA72" <DBA72@.discussions.microsoft.com> wrote in message
> news:A5CBA5C7-9FA1-40A1-8132-45DC9E838D60@.microsoft.com...
> >I want to add an export option for the report dropdown menus that will
> >allow
> > users to export reports to tab delimited files. This will allow them to
> > open
> > up the data of a report directly in excel.
> >
> > Does anyone know if this can be done?
>
>

Thursday, February 16, 2012

Add AM or PM to date in text box

How do i add eith AM or PM at the end of the date in the expression of a
textbox
this is what i currently have
format(Globals!ExecutionTime, "dd/MM/yy hh:mm")
but i want it to output 02/08/06 5:02 PM
thanks in advanceTango wrote:
> How do i add eith AM or PM at the end of the date in the expression of a
> textbox
> this is what i currently have
> format(Globals!ExecutionTime, "dd/MM/yy hh:mm")
> but i want it to output 02/08/06 5:02 PM
> thanks in advance
Remove the Format and just give Globals!ExecutionTime.it will do what
you want
Regards
Raj Deep.A|||Thanks
but the date is round the wrong way, its outputting 02/08/06 5:02 PM (ie
MM/dd/yy)
"RajDeep" wrote:
> Tango wrote:
> > How do i add eith AM or PM at the end of the date in the expression of a
> > textbox
> >
> > this is what i currently have
> >
> > format(Globals!ExecutionTime, "dd/MM/yy hh:mm")
> >
> > but i want it to output 02/08/06 5:02 PM
> >
> > thanks in advance
> Remove the Format and just give Globals!ExecutionTime.it will do what
> you want
> Regards
> Raj Deep.A
>|||Oh Sorry,
You can achieve that by format(Globals!ExecutionTime, "dd/MM/yy
hh:mm:ss tt")
regards
Raj Deep.A
Tango wrote:
> Thanks
> but the date is round the wrong way, its outputting 02/08/06 5:02 PM (ie
> MM/dd/yy)
> "RajDeep" wrote:
> >
> > Tango wrote:
> > > How do i add eith AM or PM at the end of the date in the expression of a
> > > textbox
> > >
> > > this is what i currently have
> > >
> > > format(Globals!ExecutionTime, "dd/MM/yy hh:mm")
> > >
> > > but i want it to output 02/08/06 5:02 PM
> > >
> > > thanks in advance
> >
> > Remove the Format and just give Globals!ExecutionTime.it will do what
> > you want
> >
> > Regards
> > Raj Deep.A
> >
> >|||Thanks heaps Raj.
"RajDeep" wrote:
> Oh Sorry,
> You can achieve that by format(Globals!ExecutionTime, "dd/MM/yy
> hh:mm:ss tt")
> regards
> Raj Deep.A
> Tango wrote:
> > Thanks
> >
> > but the date is round the wrong way, its outputting 02/08/06 5:02 PM (ie
> > MM/dd/yy)
> >
> > "RajDeep" wrote:
> >
> > >
> > > Tango wrote:
> > > > How do i add eith AM or PM at the end of the date in the expression of a
> > > > textbox
> > > >
> > > > this is what i currently have
> > > >
> > > > format(Globals!ExecutionTime, "dd/MM/yy hh:mm")
> > > >
> > > > but i want it to output 02/08/06 5:02 PM
> > > >
> > > > thanks in advance
> > >
> > > Remove the Format and just give Globals!ExecutionTime.it will do what
> > > you want
> > >
> > > Regards
> > > Raj Deep.A
> > >
> > >
>

Thursday, February 9, 2012

actual calc result not the same as Reporting Service calc result

I am using a table and at the grouping level, I am dividing the sum of one
field (oputut format 1 decimal position) by the sum of another field (output
format 1 decimal position). The output appears as follows .6 / 1.4 . If you
do the math on a calculator, the result wound be arounded .43. However
Visual Studio is calculating .45 (output format 2 decimals) . I suspect this
is because the detail (4 decimal positions) is summarized and then rounded.
My calculation is sum(a) / sum(b) with an output format mask of 2 decimal
places.
Is there any way to reference the actual data from the report summary line
(the .6 and the 1.4), or Can I construct my equation in such a way that when
the data on the report is calcualted manually it agrees with the results from
Visual Studio? The users will not trust the data if they manually try to
verify the report and it doesn't match.On Mar 23, 12:55 pm, ppbedz <ppb...@.discussions.microsoft.com> wrote:
> I am using a table and at the grouping level, I am dividing the sum of one
> field (oputut format 1 decimal position) by the sum of another field (output
> format 1 decimal position). The output appears as follows .6 / 1.4 . If you
> do the math on a calculator, the result wound be arounded .43. However
> Visual Studio is calculating .45 (output format 2 decimals) . I suspect this
> is because the detail (4 decimal positions) is summarized and then rounded.
> My calculation is sum(a) / sum(b) with an output format mask of 2 decimal
> places.
> Is there any way to reference the actual data from the report summary line
> (the .6 and the 1.4), or Can I construct my equation in such a way that when
> the data on the report is calcualted manually it agrees with the results from
> Visual Studio? The users will not trust the data if they manually try to
> verify the report and it doesn't match.
If I'm understanding you correctly, you can either do the calculation
as part of the stored procedure/query that is sourcing the report
(i.e., CAST(SUM(A)/SUM(B) AS DECIMAL(10,2)) or similar) or call a
stored procedure that includes this type of calculation in the VS
application. Also, you could use something like this as part of a
stored procedure: CAST(SUM(CAST(A AS DECIMAL(10,2)))/SUM(CAST(B AS
DECIMAL(10,2))) AS DECIMAL(20,2)). Hope this is helpful.
Regards,
Enrique Martinez
Sr. SQL Server Developer|||Enrique,
What does "CAST" mean, and is there somewhere that I can get a list of all
the function codes (ie. cast, sum, etc.) and their descriptions?
Thank you,
Patti
"EMartinez" wrote:
> On Mar 23, 12:55 pm, ppbedz <ppb...@.discussions.microsoft.com> wrote:
> > I am using a table and at the grouping level, I am dividing the sum of one
> > field (oputut format 1 decimal position) by the sum of another field (output
> > format 1 decimal position). The output appears as follows .6 / 1.4 . If you
> > do the math on a calculator, the result wound be arounded .43. However
> > Visual Studio is calculating .45 (output format 2 decimals) . I suspect this
> > is because the detail (4 decimal positions) is summarized and then rounded.
> > My calculation is sum(a) / sum(b) with an output format mask of 2 decimal
> > places.
> >
> > Is there any way to reference the actual data from the report summary line
> > (the .6 and the 1.4), or Can I construct my equation in such a way that when
> > the data on the report is calcualted manually it agrees with the results from
> > Visual Studio? The users will not trust the data if they manually try to
> > verify the report and it doesn't match.
> If I'm understanding you correctly, you can either do the calculation
> as part of the stored procedure/query that is sourcing the report
> (i.e., CAST(SUM(A)/SUM(B) AS DECIMAL(10,2)) or similar) or call a
> stored procedure that includes this type of calculation in the VS
> application. Also, you could use something like this as part of a
> stored procedure: CAST(SUM(CAST(A AS DECIMAL(10,2)))/SUM(CAST(B AS
> DECIMAL(10,2))) AS DECIMAL(20,2)). Hope this is helpful.
> Regards,
> Enrique Martinez
> Sr. SQL Server Developer
>|||Enrique,
Here is a simplified sample of my expression statement with the "CAST" added:
=CAST(Sum( Fields!Measures_M1Vol_N.Value) as decimal(13,1) ) /
CAST(Sum( Fields!Measures_M2BudVol_N.Value) as decimal(13,1) )
When I go to preview my report is says that "Name CAST is not declared".
I did the calculations manually and my probelm is defitely the fact that the
calcualations are performed on unrounded data, therefore giving me a larger
result. If possible I need to be able to round the numerator and the
denominator before the division actually takes place. Is there a different
way to format the expression so it will do this?
Thank you,
Patti
"ppbedz" wrote:
> I am using a table and at the grouping level, I am dividing the sum of one
> field (oputut format 1 decimal position) by the sum of another field (output
> format 1 decimal position). The output appears as follows .6 / 1.4 . If you
> do the math on a calculator, the result wound be arounded .43. However
> Visual Studio is calculating .45 (output format 2 decimals) . I suspect this
> is because the detail (4 decimal positions) is summarized and then rounded.
> My calculation is sum(a) / sum(b) with an output format mask of 2 decimal
> places.
> Is there any way to reference the actual data from the report summary line
> (the .6 and the 1.4), or Can I construct my equation in such a way that when
> the data on the report is calcualted manually it agrees with the results from
> Visual Studio? The users will not trust the data if they manually try to
> verify the report and it doesn't match.