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

Friday, March 23, 2012

How to setup LockTime value?

When I set the deadlock timeout value by "set @.@.lock_timeout", if I log off
from the server, the value will be set to the default value "-1".
How to set up the value, which can be applied where the server start up?
Thanks.
AlistairLock timeout can not be set that way... sorry...( and do not remember any
Trace flags which allow it to be set for all users either.)
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.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
"Alistair" <anonymous@.discussions.microsoft.com> wrote in message
news:6D258EAB-7A0F-44D6-AB4A-DFEB1D7EE74E@.microsoft.com...
quote:

> When I set the deadlock timeout value by "set @.@.lock_timeout", if I log

off from the server, the value will be set to the default value "-1".
quote:

> How to set up the value, which can be applied where the server start up?
> Thanks.
> Alistair
sql

How to setup LockTime value?

When I set the deadlock timeout value by "set @.@.lock_timeout", if I log off from the server, the value will be set to the default value "-1".
How to set up the value, which can be applied where the server start up?
Thanks.
AlistairLock timeout can not be set that way... sorry...( and do not remember any
Trace flags which allow it to be set for all users either.)
--
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.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
"Alistair" <anonymous@.discussions.microsoft.com> wrote in message
news:6D258EAB-7A0F-44D6-AB4A-DFEB1D7EE74E@.microsoft.com...
> When I set the deadlock timeout value by "set @.@.lock_timeout", if I log
off from the server, the value will be set to the default value "-1".
> How to set up the value, which can be applied where the server start up?
> Thanks.
> Alistair

Wednesday, March 21, 2012

How to setup default value using GETDATE?

Hi, All
On Northwind database in SQL Server 2000, I try to setup default value at
table design windows for "OrderDate" using GETDATE(), but it does not work.
How do I use setup GETDATE default value for date type? Thanks

KaiOn Sun, 09 May 2004 03:39:07 GMT, kai wrote:

>Hi, All
> On Northwind database in SQL Server 2000, I try to setup default value at
>table design windows for "OrderDate" using GETDATE(), but it does not work.
>How do I use setup GETDATE default value for date type? Thanks
>Kai

Hi Kai,

ALTER TABLE MyTable
ADD DEFAULT GETDATE() FOR MyColumn
go

Best, Hugo
--

(Remove _NO_ and _SPAM_ to get my e-mail address)|||What do you mean exactly by 'it does not work'? Note that the default value
is used only when the column is omitted from the INSERT column list.

To add to Hugo's response, it's a good idea to name constraints explicitly
so that subsequent schema maintenance is easier:

ALTER TABLE MyTable
ADD CONSTRAINT DF_MyTable_MyColumn
DEFAULT GETDATE() FOR MyColumn

--
Hope this helps.

Dan Guzman
SQL Server MVP

"kai" <kailiang@.earthlink.net> wrote in message
news:vJhnc.3578$KE6.2982@.newsread3.news.atl.earthl ink.net...
> Hi, All
> On Northwind database in SQL Server 2000, I try to setup default value
at
> table design windows for "OrderDate" using GETDATE(), but it does not
work.
> How do I use setup GETDATE default value for date type? Thanks
> Kaisql

Monday, March 12, 2012

How to set the parameter's default value dynamically?

Hi all,

Does anybody know how to set the parameter's default value dynamically?

I'm working on a report with some parameters against datacube, and I hope the default value of one of the parameters could be set dynamically based on the user's login.

Thanks,

Jone

Jone,

In your Report Parameter - Default Values - Non-Queries you can place an expression like so:

=IIf(User!UserID = "Bob", "USA","Canada")

I hope this is what you were looking for.

Ham

How to set the default value for a datetime culomn?

I try to set a default value (getdate()) for a datetime culomn in sql mobile,
but got error when i insert record:

there was a syntax error in the date format. [expression = getdate()]

may be I can only set a exict date ?

If you want to insert current datetime by calling getdate() method, then it is possible in sql server everywhere. you can do like this;

insert into employee values (4,'John',25, getdate())

This will insert current datetime in the fourth column (in above example).

Please let me know if it answers your question.

Thanks

Sachin

|||

It is just getdate()

Not (getdate())

|||do u mean in sql werver or in asp.net|||Duh ,

He encapsulated it in an expression which started with a ( and so it ended with a ) It is correct. He did not just use the function getdate() as you indicated here.

How to set the default value for a datetime culomn?

I try to set a default value (getdate()) for a datetime culomn in sql mobile,
but got error when i insert record:

there was a syntax error in the date format. [expression = getdate()]

may be I can only set a exict date ?

If you want to insert current datetime by calling getdate() method, then it is possible in sql server everywhere. you can do like this;

insert into employee values (4,'John',25, getdate())

This will insert current datetime in the fourth column (in above example).

Please let me know if it answers your question.

Thanks

Sachin

|||

It is just getdate()

Not (getdate())

|||do u mean in sql werver or in asp.net|||Duh ,

He encapsulated it in an expression which started with a ( and so it ended with a ) It is correct. He did not just use the function getdate() as you indicated here.

How to set the default value for a datetime culomn?

I try to set a default value (getdate()) for a datetime culomn in sql mobile,
but got error when i insert record:

there was a syntax error in the date format. [expression = getdate()]

may be I can only set a exict date ?

If you want to insert current datetime by calling getdate() method, then it is possible in sql server everywhere. you can do like this;

insert into employee values (4,'John',25, getdate())

This will insert current datetime in the fourth column (in above example).

Please let me know if it answers your question.

Thanks

Sachin

|||

It is just getdate()

Not (getdate())

|||do u mean in sql werver or in asp.net|||Duh ,

He encapsulated it in an expression which started with a ( and so it ended with a ) It is correct. He did not just use the function getdate() as you indicated here.

How to set the default value for a datetime culomn?

I try to set a default value (getdate()) for a datetime culomn in sql mobile,
but got error when i insert record:

there was a syntax error in the date format. [expression = getdate()]

may be I can only set a exict date ?

If you want to insert current datetime by calling getdate() method, then it is possible in sql server everywhere. you can do like this;

insert into employee values (4,'John',25, getdate())

This will insert current datetime in the fourth column (in above example).

Please let me know if it answers your question.

Thanks

Sachin

|||

It is just getdate()

Not (getdate())

|||do u mean in sql werver or in asp.net|||Duh ,

He encapsulated it in an expression which started with a ( and so it ended with a ) It is correct. He did not just use the function getdate() as you indicated here.

How to set the default value for a datetime culomn?

I try to set a default value (getdate()) for a datetime culomn in sql mobile,
but got error when i insert record:

there was a syntax error in the date format. [expression = getdate()]

may be I can only set a exict date ?

If you want to insert current datetime by calling getdate() method, then it is possible in sql server everywhere. you can do like this;

insert into employee values (4,'John',25, getdate())

This will insert current datetime in the fourth column (in above example).

Please let me know if it answers your question.

Thanks

Sachin

|||

It is just getdate()

Not (getdate())

|||do u mean in sql werver or in asp.net|||Duh ,

He encapsulated it in an expression which started with a ( and so it ended with a ) It is correct. He did not just use the function getdate() as you indicated here.

how to set the default value

I have database in sql server. One field called datesent, i would like to set the default value as now(), i just type in the default value in database design, it didn't work. Please help, many thanks.try this: getdate()|||It works, thank you very much!|||I use the getdate() as the default value. But i found the value like "
11/8/2005 10:14:00 AM. How can i set the default value like the format as:
11/8/2005. Thanks.|||hi,

try this

create table yourTable
(
ColumnName datetime default convert(varchar,getdate(),107)
)

How to set the default value

I want to use SQL to set the default of a field.
How can I implement with DDL?
ad
CREATE TABLE #Test
(
col1 INT NOT NULL PRIMARY KEY,
col2 DATETIME DEAFULT GETDATE()
)
INSERT INTO #Test (col1) VALUES (1)
GO
SELECT * FROM #Test
"ad" <ad@.wfes.tcc.edu.tw> wrote in message
news:OZmeP74XFHA.3584@.TK2MSFTNGP14.phx.gbl...
> I want to use SQL to set the default of a field.
> How can I implement with DDL?
>
|||CREATE TABLE Testdata
(
TestIDCOlumn INT,
TestColumn varchar(10) DEFAULT 'Test'
)
Insert into Testdata(TestIDColumn) Values (1)
Select * from Testdata
Drop Table Testdata
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
"ad" <ad@.wfes.tcc.edu.tw> schrieb im Newsbeitrag
news:OZmeP74XFHA.3584@.TK2MSFTNGP14.phx.gbl...
>I want to use SQL to set the default of a field.
> How can I implement with DDL?
>
|||Thank,
If the TestColumn have create before, but did not set default value yet.
Can I modify the structrue now , set the default value to that column?
"Jens Smeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de> gl
sD:ew5otC5XFHA.2076@.TK2MSFTNGP15.phx.gbl...
> CREATE TABLE Testdata
> (
> TestIDCOlumn INT,
> TestColumn varchar(10) DEFAULT 'Test'
> )
> Insert into Testdata(TestIDColumn) Values (1)
> Select * from Testdata
> Drop Table Testdata
> --
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
> "ad" <ad@.wfes.tcc.edu.tw> schrieb im Newsbeitrag
> news:OZmeP74XFHA.3584@.TK2MSFTNGP14.phx.gbl...
>
|||alter table TestData
add constraint DF_TestDate_TestColumn
default ('Test') for TestColumn
HTH,
Gert-Jan
ad wrote:[vbcol=seagreen]
> Thank,
> If the TestColumn have create before, but did not set default value yet.
> Can I modify the structrue now , set the default value to that column?
> "Jens Smeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de> gl
> sD:ew5otC5XFHA.2076@.TK2MSFTNGP15.phx.gbl...
|||You would probably have to
rename the column
add a new column with default value
move data from orig column to new column
drop orig column
rename new column to orig name
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
"ad" <ad@.wfes.tcc.edu.tw> wrote in message
news:%23BW3EA%23XFHA.4036@.tk2msftngp13.phx.gbl...
> Thank,
> If the TestColumn have create before, but did not set default value yet.
> Can I modify the structrue now , set the default value to that column?
> "Jens Smeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de>
> gl
> sD:ew5otC5XFHA.2076@.TK2MSFTNGP15.phx.gbl...
>

How to set the default value

I want to use SQL to set the default of a field.
How can I implement with DDL?ad
CREATE TABLE #Test
(
col1 INT NOT NULL PRIMARY KEY,
col2 DATETIME DEAFULT GETDATE()
)
INSERT INTO #Test (col1) VALUES (1)
GO
SELECT * FROM #Test
"ad" <ad@.wfes.tcc.edu.tw> wrote in message
news:OZmeP74XFHA.3584@.TK2MSFTNGP14.phx.gbl...
> I want to use SQL to set the default of a field.
> How can I implement with DDL?
>|||CREATE TABLE Testdata
(
TestIDCOlumn INT,
TestColumn varchar(10) DEFAULT 'Test'
)
Insert into Testdata(TestIDColumn) Values (1)
Select * from Testdata
Drop Table Testdata
--
HTH, Jens Suessmeyer.
--
http://www.sqlserver2005.de
--
"ad" <ad@.wfes.tcc.edu.tw> schrieb im Newsbeitrag
news:OZmeP74XFHA.3584@.TK2MSFTNGP14.phx.gbl...
>I want to use SQL to set the default of a field.
> How can I implement with DDL?
>|||Thank,
If the TestColumn have create before, but did not set default value yet.
Can I modify the structrue now , set the default value to that column?
"Jens Süßmeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de> ¼¶¼g©ó¶l
¥ó·s»D:ew5otC5XFHA.2076@.TK2MSFTNGP15.phx.gbl...
> CREATE TABLE Testdata
> (
> TestIDCOlumn INT,
> TestColumn varchar(10) DEFAULT 'Test'
> )
> Insert into Testdata(TestIDColumn) Values (1)
> Select * from Testdata
> Drop Table Testdata
> --
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
> "ad" <ad@.wfes.tcc.edu.tw> schrieb im Newsbeitrag
> news:OZmeP74XFHA.3584@.TK2MSFTNGP14.phx.gbl...
> >I want to use SQL to set the default of a field.
> > How can I implement with DDL?
> >
> >
>|||alter table TestData
add constraint DF_TestDate_TestColumn
default ('Test') for TestColumn
HTH,
Gert-Jan
ad wrote:
> Thank,
> If the TestColumn have create before, but did not set default value yet.
> Can I modify the structrue now , set the default value to that column?
> "Jens Süßmeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de> ¼¶¼g©ó¶l
> ¥ó·s»D:ew5otC5XFHA.2076@.TK2MSFTNGP15.phx.gbl...
> > CREATE TABLE Testdata
> > (
> > TestIDCOlumn INT,
> > TestColumn varchar(10) DEFAULT 'Test'
> > )
> >
> > Insert into Testdata(TestIDColumn) Values (1)
> >
> > Select * from Testdata
> >
> > Drop Table Testdata
> >
> > --
> > HTH, Jens Suessmeyer.
> >
> > --
> > http://www.sqlserver2005.de
> > --
> > "ad" <ad@.wfes.tcc.edu.tw> schrieb im Newsbeitrag
> > news:OZmeP74XFHA.3584@.TK2MSFTNGP14.phx.gbl...
> > >I want to use SQL to set the default of a field.
> > > How can I implement with DDL?
> > >
> > >
> >
> >|||You would probably have to
rename the column
add a new column with default value
move data from orig column to new column
drop orig column
rename new column to orig name
--
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
"ad" <ad@.wfes.tcc.edu.tw> wrote in message
news:%23BW3EA%23XFHA.4036@.tk2msftngp13.phx.gbl...
> Thank,
> If the TestColumn have create before, but did not set default value yet.
> Can I modify the structrue now , set the default value to that column?
> "Jens Süßmeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de>
> ¼¶¼g©ó¶l
> ¥ó·s»D:ew5otC5XFHA.2076@.TK2MSFTNGP15.phx.gbl...
>> CREATE TABLE Testdata
>> (
>> TestIDCOlumn INT,
>> TestColumn varchar(10) DEFAULT 'Test'
>> )
>> Insert into Testdata(TestIDColumn) Values (1)
>> Select * from Testdata
>> Drop Table Testdata
>> --
>> HTH, Jens Suessmeyer.
>> --
>> http://www.sqlserver2005.de
>> --
>> "ad" <ad@.wfes.tcc.edu.tw> schrieb im Newsbeitrag
>> news:OZmeP74XFHA.3584@.TK2MSFTNGP14.phx.gbl...
>> >I want to use SQL to set the default of a field.
>> > How can I implement with DDL?
>> >
>> >
>>
>

How to set the default value

I want to use SQL to set the default of a field.
How can I implement with DDL?ad
CREATE TABLE #Test
(
col1 INT NOT NULL PRIMARY KEY,
col2 DATETIME DEAFULT GETDATE()
)
INSERT INTO #Test (col1) VALUES (1)
GO
SELECT * FROM #Test
"ad" <ad@.wfes.tcc.edu.tw> wrote in message
news:OZmeP74XFHA.3584@.TK2MSFTNGP14.phx.gbl...
> I want to use SQL to set the default of a field.
> How can I implement with DDL?
>|||CREATE TABLE Testdata
(
TestIDCOlumn INT,
TestColumn varchar(10) DEFAULT 'Test'
)
Insert into Testdata(TestIDColumn) Values (1)
Select * from Testdata
Drop Table Testdata
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"ad" <ad@.wfes.tcc.edu.tw> schrieb im Newsbeitrag
news:OZmeP74XFHA.3584@.TK2MSFTNGP14.phx.gbl...
>I want to use SQL to set the default of a field.
> How can I implement with DDL?
>|||Thank,
If the TestColumn have create before, but did not set default value yet.
Can I modify the structrue now , set the default value to that column?
"Jens Smeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de> gl
sD:ew5otC5XFHA.2076@.TK2MSFTNGP15.phx.gbl...
> CREATE TABLE Testdata
> (
> TestIDCOlumn INT,
> TestColumn varchar(10) DEFAULT 'Test'
> )
> Insert into Testdata(TestIDColumn) Values (1)
> Select * from Testdata
> Drop Table Testdata
> --
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
> "ad" <ad@.wfes.tcc.edu.tw> schrieb im Newsbeitrag
> news:OZmeP74XFHA.3584@.TK2MSFTNGP14.phx.gbl...
>|||alter table TestData
add constraint DF_TestDate_TestColumn
default ('Test') for TestColumn
HTH,
Gert-Jan
ad wrote:[vbcol=seagreen]
> Thank,
> If the TestColumn have create before, but did not set default value yet.
> Can I modify the structrue now , set the default value to that column?
> "Jens Smeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de> g
l
> sD:ew5otC5XFHA.2076@.TK2MSFTNGP15.phx.gbl...|||You would probably have to
rename the column
add a new column with default value
move data from orig column to new column
drop orig column
rename new column to orig name
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
"ad" <ad@.wfes.tcc.edu.tw> wrote in message
news:%23BW3EA%23XFHA.4036@.tk2msftngp13.phx.gbl...
> Thank,
> If the TestColumn have create before, but did not set default value yet.
> Can I modify the structrue now , set the default value to that column?
> "Jens Smeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de>
> gl
> sD:ew5otC5XFHA.2076@.TK2MSFTNGP15.phx.gbl...
>

how to set the default filename when exporting the report

Dear Anyone,

When exporting a report to another format, say excel; the file name is always set to the report name. Our client has a requirement where whenever a user exports a report to excel, the timestamp of when the data of the report was made should be appended in the filename. Is there a way to do this in Reporting Services as well as report builder?

Thanks,
JosephThere is no way to change the name of the export. You could set up a subscription to save the file off to a file. Not sure if that will sufficient or not for your scenario.

-Daniel|||

With Reporting Service 2005, you can create a data-driven subscription and set the FILENAME parameter.

Here is a sample query:

select'bogus - '+LEFT(DATENAME(month,getdate()),3)+' '+(CAST(DatePart(dd,GetDate())asnvarchar)+' '+CAST(DatePart(yyyy,GetDate())asnvarchar))asFILENAME

Hope this helps!

Thanks.

|||I am not sure, but I recall
Data-Driven Subscription is part of SQL Server/Report Server 2005Enterprise edition only|||

hi,

Can you help me on this issue,

My requirement is need to change the Report data file name appending with timestamp.

1. I created RDL
2. Opening the RDL data into my GWT application with new IE window
3. Exporting the data into excel/pdf.
4. Able to popup Download file Dialog.
5. Asking the File to save. ( Here by defualt it's giving the RDL File name only. I want to display with RDL file name with timestamp).

But what every you said , I created data-driven subscription, In Delivery Query Screen: Even i tried with A shared data source, able to validate the Command text. Finally not able to change the file name. Can you please tell what is the problem is.

best regards

bhushanam

how to set the default filename when exporting the report

Dear Anyone,

When exporting a report to another format, say excel; the file name is always set to the report name. Our client has a requirement where whenever a user exports a report to excel, the timestamp of when the data of the report was made should be appended in the filename. Is there a way to do this in Reporting Services as well as report builder?

Thanks,
JosephThere is no way to change the name of the export. You could set up a subscription to save the file off to a file. Not sure if that will sufficient or not for your scenario.

-Daniel|||

With Reporting Service 2005, you can create a data-driven subscription and set the FILENAME parameter.

Here is a sample query:

select 'bogus - ' + LEFT(DATENAME(month, getdate()),3) + ' ' + (CAST(DatePart(dd, GetDate()) as nvarchar) + ' ' + CAST(DatePart(yyyy, GetDate()) as nvarchar)) as FILENAME

Hope this helps!

Thanks.

|||I am not sure, but I recall
Data-Driven Subscription is part of SQL Server/Report Server 2005 Enterprise edition only|||

hi,

Can you help me on this issue,

My requirement is need to change the Report data file name appending with timestamp.

1. I created RDL
2. Opening the RDL data into my GWT application with new IE window
3. Exporting the data into excel/pdf.
4. Able to popup Download file Dialog.
5. Asking the File to save. ( Here by defualt it's giving the RDL File name only. I want to display with RDL file name with timestamp).

But what every you said , I created data-driven subscription, In Delivery Query Screen: Even i tried with A shared data source, able to validate the Command text. Finally not able to change the file name. Can you please tell what is the problem is.

best regards

bhushanam

how to set the default filename when exporting the report

Dear Anyone,

When exporting a report to another format, say excel; the file name is always set to the report name. Our client has a requirement where whenever a user exports a report to excel, the timestamp of when the data of the report was made should be appended in the filename. Is there a way to do this in Reporting Services as well as report builder?

Thanks,
JosephThere is no way to change the name of the export. You could set up a subscription to save the file off to a file. Not sure if that will sufficient or not for your scenario.

-Daniel|||

With Reporting Service 2005, you can create a data-driven subscription and set the FILENAME parameter.

Here is a sample query:

select 'bogus - ' + LEFT(DATENAME(month, getdate()),3) + ' ' + (CAST(DatePart(dd, GetDate()) as nvarchar) + ' ' + CAST(DatePart(yyyy, GetDate()) as nvarchar)) as FILENAME

Hope this helps!

Thanks.

|||I am not sure, but I recall
Data-Driven Subscription is part of SQL Server/Report Server 2005 Enterprise edition only

How to set SQL Server and VS default folder paths?

Ive just installed VS2005 Pro and SQL Server Developer edition.

Now I want to set the default paths for project, templates, settings. But I want for both VS and SQL files.

For example, right now the default folders for SQL Studio are:

.\My Documents\SQL Server Management Studio\Projects

.\My Documents\SQL Server Management Studio\Settings

.\My Documents\SQL Server Management Studio\Templates

.\My Documents\SQL Server Management Studio\Backup Files

... and so on.

For VS Studio:

.\My Documents\Visual Studio 2005\Projects

.\My Documents\Visual Studio 2005\Templates

.\My Documents\Visual Studio 2005\Code Snippets

... and so on.

I would like for all sub-folders(from SQL Server and VS) to be in one same folder(Development), for example:

.\My Documents\Development\Projects

.\My Documents\Development\Settings

.\My Documents\Development\Templates

.\My Documents\Development\Backup Files

.\My Documents\Development\Code Snippets

... and so on.

I have tried changing in each application′s options the default path for each one, pointing to each folder I listed above.

My problem is that both VS and SQL Server still keeps creating folders in the old locations, for example: ".\My Documents\SQL Server Management Studio\Projects". This example happens when I create a new query, and try to save it, it automatically creates that folder.

It only works for a few of them, like the settings folder. Ive managed to create a single folder for SQL and VS setting files.

Is there a way I can join both Application folders? I want to keep both projects files in one folder, both setting files in one folder, and so on...

I hope I explained well my situation.

Thanks!

In VS 2005 you can change default directories by going to Tools >> Options menu then selecting Projects and Solutions.

In SQL Management Studio I believe it opens your last known file path you opened.

Justin King
|||SQL Server Managemetn Studio does not retain your file location between sessions. As far as I can tell there is no way to change this and the MS help facility neither confirms nor denies this assumption.
|||

So its not possible to change that?

Ive changed all places in the registry (all the keys I think might change that)
Still it creates the folders. Are there other places I can change that?

Thanks for the help.

Friday, March 9, 2012

How to set not allow null and default

Can we use SQL to set a field of a table is not allow null and it's default.
For example, I have a St table and Seat field
I want to set the Seat field is not allow null, and it's default value to 1.
How can I wrte this SQL?CREATE TABLE St (col1 int not null, Seat int not null default 1)
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"ad" <ad@.wfes.tcc.edu.tw> wrote in message news:OdXNMc9iFHA.3568@.tk2msftngp13.phx.gbl...[vbc
ol=seagreen]
> Can we use SQL to set a field of a table is not allow null and it's defaul
t.
> For example, I have a St table and Seat field
> I want to set the Seat field is not allow null, and it's default value to
1.
> How can I wrte this SQL?
>[/vbcol]

How to set not allow null and default

Can we use SQL to set a field of a table is not allow null and it's default.
For example, I have a St table and Seat field
I want to set the Seat field is not allow null, and it's default value to 1.
How can I wrte this SQL?CREATE TABLE St (col1 int not null, Seat int not null default 1)
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"ad" <ad@.wfes.tcc.edu.tw> wrote in message news:OdXNMc9iFHA.3568@.tk2msftngp13.phx.gbl...
> Can we use SQL to set a field of a table is not allow null and it's default.
> For example, I have a St table and Seat field
> I want to set the Seat field is not allow null, and it's default value to 1.
> How can I wrte this SQL?
>

How to set not allow null and default

Can we use SQL to set a field of a table is not allow null and it's default.
For example, I have a St table and Seat field
I want to set the Seat field is not allow null, and it's default value to 1.
How can I wrte this SQL?
CREATE TABLE St (col1 int not null, Seat int not null default 1)
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"ad" <ad@.wfes.tcc.edu.tw> wrote in message news:OdXNMc9iFHA.3568@.tk2msftngp13.phx.gbl...
> Can we use SQL to set a field of a table is not allow null and it's default.
> For example, I have a St table and Seat field
> I want to set the Seat field is not allow null, and it's default value to 1.
> How can I wrte this SQL?
>