Showing posts with label default. Show all posts
Showing posts with label default. Show all posts

Friday, March 30, 2012

How can I remove the workitem type from the existing project?

When creating a new project using 'Agile' process template, there are 5 workitem types in the list of workitem type by default. After the project being created, how can I delete some workitem type that we don' t need?

For example, my team will never use 'Senario' workitem type for the project and I would like to remove this workitem type from the list. So no team member will see 'Senario' workitem type in the list when creating workitem, and therefore no one will create a workitem using 'Senario' workitem type by accident.

I understand that workitem type can't be deleted if it is used to created any workitem. So what I mean is the workitem type that has never used to create any workitem.

Thanks.

Unfortunately you cannot remove them from the list even if you have never created one. You can remove them from the template prior to creating a project and they will never be in the project. You could also try to put security on the transition from nothing to new for TFSAdmins only. That way the typical users would not be able to create a new workitem of the type Scenario. There may be other creative ways, but in the end they will still show in the list.

-paul

|||Thanks.

Monday, March 19, 2012

how can I let DATEFORMAT by default

SET DATEFORMAT change format of datetime in query
I need to let datetime format in YMD by default
How can I get it?
Thans
The language setting determines the default value for the DATEFORMAT. To
display the default setting for each language issue the following command:
sp_helplanguage
----
Need SQL Server Examples check out my website at
http://www.geocities.com/sqlserverexamples
"parodrig" <parodrig@.discussions.microsoft.com> wrote in message
news:A9A1C085-FB65-4380-A6FC-DCDB7B1529F8@.microsoft.com...
> SET DATEFORMAT change format of datetime in query
> I need to let datetime format in YMD by default
> How can I get it?
> Thans

Monday, March 12, 2012

how can I let DATEFORMAT by default

SET DATEFORMAT change format of datetime in query
I need to let datetime format in YMD by default
How can I get it?
ThansThe language setting determines the default value for the DATEFORMAT. To
display the default setting for each language issue the following command:
sp_helplanguage
----
----
--
Need SQL Server Examples check out my website at
http://www.geocities.com/sqlserverexamples
"parodrig" <parodrig@.discussions.microsoft.com> wrote in message
news:A9A1C085-FB65-4380-A6FC-DCDB7B1529F8@.microsoft.com...
> SET DATEFORMAT change format of datetime in query
> I need to let datetime format in YMD by default
> How can I get it?
> Thans

Friday, March 9, 2012

How can i insert a default row if it doenst exists already?

Hi,

I am currently loading dimensions using a Sql Server Destination and i was wondering if i can create a middle step to insert a certain row so i would identify in my dimension the undefined records... I know i can do it with sql statement but i was wondering if there is a better way.

Best Regards,

Luis Sim?es

Would this not be part of the fact load, you wish to infer the dim member from the fact data when there is not already a matching dim member? You would use either the lookup or join to detect the rows in the fact that do not have a corresponding dim member. Normally I would expect a lookup to be better for the job as there you have many more fact rows than dim rows, so lookups are normally quite effective. The lookup would be used to get the dim key (surrogate key value) and this is then inserted. You could use the error output of the lookup, or even ignore lookup failures and then use a conditional split to get a path with only rows that having missing values. You would then insert the missing Dim members then insert the fact. You will need to ensure only you do only one insert as you could have several facts missing the same dim member in one buffer.

|||

I think that was not the desired output...

What i really want to do is to insert just one row with a specific caracteristic and add it to the dimension if it doens't exists already...

That record will be used to identify "undefined" records of dimension X.

Best Regards,

|||You can very easily use a custom script component in "Source" mode to create rows.

The rest depends on your architecture, but perhaps you could union your new "unknown" member with the rest of your incoming dimension data. I assume you already have a mechanism to discard/update members that already exist.

Alternatively, you could have a separate Data Flow that tries to load unknowns for all dimensions. Each dimension would have a separate custom source to create the row, a lookup to detect it if already exists, and a destination to insert it if it doesn't.
|||

If you want to do this in the data-flow that populates the dimension table then use a script transformation to create your "Unknown" row and use a UNION transformaiton to put it together with the est of the incoming data. Very simple.

-Jamie

|||

Script and Unions will do the trick, but how often do you populate a Dim table from scratch? Would it not be easier to include the "unknown" record as part of your create table script? You only create a Dim table once, and therefore only need to do this once, so it would make more sense to me just do it manually, and avoid complicating the packge.

It also makes it easier to break that cardinal rule and hard code a surrogate key value. Code a -1 for example as the unknown, and then you can use that as a default value assigned in your pipeline if the regular lookup fails. People may complain about this logic, but it can perform rather well.

Sunday, February 19, 2012

How can I force money field works with comma instead dot?

How can I force money field works with comma instead dot?
Hi,
How can I force money field works with comma instead dot?
The default language of my Data Base is Portuguese.
Because I have to make something as below to work ok:
LgValor = Request("txtValor")
LgValor = Replace(LgValor,",",".")
So I have to put always this in the bank: 99999.99 .....
Thanks,
VILMAR
BRAZILFor input, you cannot have comma instead of dot. This is how the SQL language and SQL Server work,
quite simply.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Vilmar Brazão de Oliveira" <suporte@.hitecnet.com.br> wrote in message
news:e9KLP4ZxDHA.1680@.TK2MSFTNGP12.phx.gbl...
> How can I force money field works with comma instead dot?
> Hi,
> How can I force money field works with comma instead dot?
> The default language of my Data Base is Portuguese.
> Because I have to make something as below to work ok:
> LgValor = Request("txtValor")
> LgValor = Replace(LgValor,",",".")
> So I have to put always this in the bank: 99999.99 .....
> Thanks,
> VILMAR
> BRAZIL
>

How can i find the default values for a Stored Procedure parameter

I have a stored procedure,

CREATE PROCEDURE [dbo].[SReport]

(

@.ListByBatch BIT,

@.UnPrintedOnly BIT = 1

)

AS

............................

........

I can find the information regarding parameters of this Stored Procedure from "syscolumns" or

"Information_Schema.Parameters" system tables. These tables provides information about parametername, datatype ...etc. But dont provide information about default values for these parameters.

Here i have assigned a value, Does SQL Server stores this value?

Does SQL Server maintains information about Default Values for Parameter ? (For tables it maintains the default value for a column).

Is there any way , i can find All parameter information for a stored procedure including Default value..........?

Hi,
you can try sp_procedure_params_rowset

sp_procedure_params_rowset will return the following result set.

PROCEDURE_CATALOG Name of the database containing the procedure.

PROCEDURE_SCHEMA Owner's name of the procedure.

PROCEDURE_NAME Name of the procedure.

PARAMETER_NAMEName of the parameter.

ORDINAL_POSITION Ordinal position of the parameter.

PARAMETER_TYPE If the parameter is an OUTPUT parameter or not.

PARAMETER_HASDEFAULTIf the parameter has a default value.

PARAMETER_DEFAULTThe default value of the parameter.

IS_NULLABLEIf the parameter accepts NULL values.

DATA_TYPEData type of the parameter.

CHARACTER_MAXIMUM_LENGTHThe maximum length of the parameter's data.

CHARACTER_OCTET_LENGTHThe maximum octect length of the parameter's data.

NUMERIC_PRECISIONThe precision of the parameter.

NUMERIC_SCALEThe scale of the parameter.

DESCRIPTIONDescription of the parameter. Always NULL.

TYPE_NAMEActual name for the data type.

LOCAL_TYPE_NAMELocal name for the data type, if the data type is a user-defined data type.


|||

Hi,

Thanks for reply.

I tried this , But it shows NULL for PARAMETER_DEFAULT and 0 for PARAMETER_HASDEFAULT though i have set default value for that parameter.

Is there any other way , we can find this default value?

|||

SQL SERVER does not store the default parameter values for transact sql stored procedure. It does so for clr stored procedures. See here

http://msdn2.microsoft.com/en-us/library/ms176074.aspx

In SQL SERVER 2005, You can use object_definition() function to get the definition of the procedure and then parse it to get the default parameter values.

In SQL 2K, the syscomments system table stores the definitions for the various stored procedures.

How can I find out which filegroup a table belongs to?

Hi, everybody!
I made a database which has two filegroups. One is primary filegroup, and
the other is named FG_01.
I set FG_01 as default filegroup so that every table should be created on
it.
But I found today that a developer had created tables on primary filegroup.
I want to move these tables from primary filegroup to FG_01 filegroup.
But there are so many tables that it is difficult to find out which tables
are on primary filegroup.
How can I find out which filegroups a table belongs to by means of query?
Any advice would be appreciated.Hello Kim !
Try to use the undocumented Procedure to fugure out the Filegroups:
sp_objectfilegroup @.objid
HTH, Jens Süßmeyer.