Showing posts with label property. Show all posts
Showing posts with label property. Show all posts

Sunday, March 25, 2012

changing authentication error, Please HELP!

I am running SQL Server 2005 Express. I am trying to change the server
property to the mixed mode authentication (SQL Server and Windows
authentication mode) in SQL Server Management Studio. I loged in to the
server which is local in Managament Studio using windows authentication. When
I right click on the connection I get the following error:
-----
TITLE: Microsoft SQL Server Management Studio Express
--
Cannot show requested dialog.
--
ADDITIONAL INFORMATION:
Cannot show requested dialog. (Microsoft.SqlServer.Express.SqlMgmt)
--
Failed to retrieve data for this request.
(Microsoft.SqlServer.Express.SqlManagerUI)
For help, click:
http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476
--
Failed to connect to server ILYA-TEST-PC\SQLEXPRESS.
(Microsoft.SqlServer.Express.ConnectionInfo)
--
A connection was successfully established with the server, but then an
error occurred during the login process. (provider: Shared Memory
Provider, error: 0 - No process is on the other end of the pipe.) (Microsoft
SQL Server, Error: 233)
-----
All the protocols for SQLEXPRESS are enabled. I don't know what's going on.
I also checked the Surface Area Configuration and everything seems to be
turned on there. The log file contains the following.
-----
2006-03-30 16:38:11.98 Logon Error: 17809, Severity: 20, State: 1.
2006-03-30 16:38:11.98 Logon Could not connect because the maximum
number of '1' user connections has already been reached. The system
administrator can use sp_configure to increase the maximum value. The
connection has been closed. [CLIENT: <local machine>]
-----
But I can't increase the maximum value of connections because when I right
click on connection I get the same error mentioned above. What is going on
here? Do I need to reinstall SQL Express? I can't get rid of this stupid
error. Thank you.
Ilyause command line utility to connect to express and change the setting.
e.g.
sqlcmd -S".\Express" -Q"exec sp_configure 'user connections','32767';
reconfigure with override"
--
-oj
"Ilya" <Ilya@.discussions.microsoft.com> wrote in message
news:D58D1B38-F886-4285-90FB-F1CADFCE9B4A@.microsoft.com...
>I am running SQL Server 2005 Express. I am trying to change the server
> property to the mixed mode authentication (SQL Server and Windows
> authentication mode) in SQL Server Management Studio. I loged in to the
> server which is local in Managament Studio using windows authentication.
> When
> I right click on the connection I get the following error:
> -----
> TITLE: Microsoft SQL Server Management Studio Express
> --
> Cannot show requested dialog.
> --
> ADDITIONAL INFORMATION:
> Cannot show requested dialog. (Microsoft.SqlServer.Express.SqlMgmt)
> --
> Failed to retrieve data for this request.
> (Microsoft.SqlServer.Express.SqlManagerUI)
> For help, click:
> http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476
> --
> Failed to connect to server ILYA-TEST-PC\SQLEXPRESS.
> (Microsoft.SqlServer.Express.ConnectionInfo)
> --
> A connection was successfully established with the server, but then an
> error occurred during the login process. (provider: Shared Memory
> Provider, error: 0 - No process is on the other end of the pipe.)
> (Microsoft
> SQL Server, Error: 233)
> -----
> All the protocols for SQLEXPRESS are enabled. I don't know what's going
> on.
> I also checked the Surface Area Configuration and everything seems to be
> turned on there. The log file contains the following.
> -----
> 2006-03-30 16:38:11.98 Logon Error: 17809, Severity: 20, State: 1.
> 2006-03-30 16:38:11.98 Logon Could not connect because the maximum
> number of '1' user connections has already been reached. The system
> administrator can use sp_configure to increase the maximum value. The
> connection has been closed. [CLIENT: <local machine>]
> -----
> But I can't increase the maximum value of connections because when I right
> click on connection I get the same error mentioned above. What is going on
> here? Do I need to reinstall SQL Express? I can't get rid of this stupid
> error. Thank you.
> Ilya
>

Thursday, March 22, 2012

Changing a fields backgroung color IIF

Hi All,
I need to change the backgroung color to a field in the background property...

=iif(Fields!act_shp_dt.Value <> Fields!prm_shp_dt.Value , " Late ","")
This is the field and I want it to change color if the statement is true. Can anyone help?
Thank you in advanced, Kerrie

I never attempted this on a per cell basis but it should work;
Create a function in the code section, something like this...
function getColor(s1 as string, s2 as string) as String
getColor = iif((s1 <> s2), "Red", "White")
end function
then call the function from your textbox like this...
<BackgroundColor>=Code.getColor(Fields!act_shp_dt.Value , Fields!prm_shp_dt.Value )</BackgroundColor>
|||you code seems fine but make sure you use the colors you want to show:
=iif(Fields!act_shp_dt.Value <> Fields!prm_shp_dt.Value , " <some_color>","<some_color>")

Changing a field background color IIF.....

Hi All,
I need to change the backgroung color to a field in the background property....

=iif(Fields!act_shp_dt.Value <> Fields!prm_shp_dt.Value , " Late ","")

This is the field and I want it to change color if the statement is true. Can anyone help?

Thank you in advanced, Kerrie

You have a misunderstand.
You should put a label or something like that and in the backgroud propertie put the expression.
=iif(Fields!act_shp_dt.Value <> Fields!prm_shp_dt.Value , "Blue","Red")
That's all|||Thank You so much for your help. That did it!!!Big Smile

Tuesday, March 20, 2012

changing "header rows to skip" property in flat file connection during runtime

Hi all

I have a flat file.I am trying to set the value for the property "HeaderRowsToSkip" during runtime.I have set an expression for this in my "flat file connection manager". But this is not working.The connection manager is not able to take the value during runtime.

My expression is as follows:

DataRowsToSkip : @.[user:: Var]

where "Var" is my variable which gets the value from the rowcount component and trying to set it back to the "HeaderRowsToskip" property.

I ve even tried setting the value to the "HeaderRowsToSkip" property in the expression builder.

Its not working....

Can anyone help me out in solving this?

Thanks in advance

Regards

Suganya

Is the rowCont component part of the same data flow where your trying to write into the flat file? If so; there might be the problem (no 100% sure); but I am guessing that by the time the flat file connection manager gets 'configured' the rowcount variable has not been populated.

Try moving the logic of the row count to a different dataflow at the beginning of the control flow and see if that helps...

|||

I tried the option which you have mentioned.Its not working...Is there any other way to achieve this?

And what is meant by "flat file connection manager getting configured?".Does it mean that when i start running my package,It sets all the values and during runtime i cant change my connection manager details?.I get this doubt because the connection manager is able to skip the number of rows with the same expression being used and setting the value for the variable which am using in the expression during design time.

Thanks in advance.

Regards,

Suganya

|||

I've just had a go at this and it works fine.

Where is the rowcount component? Is it in the same data-flow?

-Jamie

|||

No...its not in the same dataflow task.As you said in the previous post i have changed it another data flow task.

My package has the following tasks and components

1.Dataflow task(1) containing a flatfile ,a rowcount and an OLE DB destination

2.Dataflow task(2) containing a flat file and an OLE DB destination

Only for the flat file available in the data flow task(2),I have set the expression and am not using the same connection manager which i ve used in the dataflow task(1).

am i doing anything wrong?

Regards,

Suganya

|||

All except one thing. Why have you got a an OLE DB Destination in the first data-flow? Where are you inserting the data to? You can terminate the data-flow with the rowcount compoennt - that seems to be all you need.

-Jamie

|||

Suganya Mahadevan wrote:

I tried the option which you have mentioned.Its not working...Is there any other way to achieve this?

And what is meant by "flat file connection manager getting configured?".Does it mean that when i start running my package,It sets all the values and during runtime i cant change my connection manager details?.

Yes; and the behavior you described proof that. The connection manager gets set up using the available values when the execution starts; at that point he only value available for the rowcount variable is the one given at design time; as no rows have started to flow. That is why I was suggesting moving the rowcount logic to a previous stage.

But I got a question for you; is the row count variable being populated based on the same file you are trying to skip the rows from? That would not cause to skip all the rows every time? (Unless you are using different files)

|||

Its not working.I have removed the OLE DB destination from my dataflow task(1) and now trying to get the rowcount value from dataflow task(1) and set the value to the flat file connection manager's "HeaderRowsToSkip" in dataflow task(2).

My flatfile in dataflow task(1) has 100 records and my flatfile in dataflow task has 5000 records.My rowcount variable in dataflow task(1) has 100 as its value now(as i have 100 records in flatfile).So my flatfile in dataflow task(2) should skip first 100 rows and insert 4900 rows into the destination.But its not working that way.Its inserting all the 5000 records into the destination.

But the same scenario is working when i set the value during design time and i have specified this in my previous post.

|||

No its 2 different files.

My package has the following tasks and components

1.Dataflow task(1) containing a flatfile ,a rowcount and an OLE DB destination

2.Dataflow task(2) containing a flat file and an OLE DB destination

Only for the flat file available in the data flow task(2),I have set the expression and am not using the same connection manager which i ve used in the dataflow task(1).

My flatfile in dataflow task(1) has 100 records and my flatfile in dataflow task has 5000 records.My rowcount variable in dataflow task(1) has 100 as its value now(as i have 100 records in flatfile).So my flatfile in dataflow task(2) should skip first 100 rows and insert 4900 rows into the destination.But its not working that way.Its inserting all the 5000 records into the destination.

What is the problem with my package?

|||

Suganya Mahadevan wrote:

Its not working.I have removed the OLE DB destination from my dataflow task(1) and now trying to get the rowcount value from dataflow task(1) and set the value to the flat file connection manager's "HeaderRowsToSkip" in dataflow task(2).

My flatfile in dataflow task(1) has 100 records and my flatfile in dataflow task has 5000 records.My rowcount variable in dataflow task(1) has 100 as its value now(as i have 100 records in flatfile).So my flatfile in dataflow task(2) should skip first 100 rows and insert 4900 rows into the destination.But its not working that way.Its inserting all the 5000 records into the destination.

But the same scenario is working when i set the value during design time and i have specified this in my previous post.

Could you set a break point in the second dataflow and then execute the package; when it breaks; could you check the value of the rowcount variable to see if it's properly populated?

Let's make sure first the variable is correctly populated...

|||

Yes.Am able to see the value of the variable getting changed.I used script task to populate the value of the variable.Its getting set properly.(I am not doing any manipulation inside the script task except trying to populate the value in msg box.)

By the way,I tried enabling the breakpoint on "Variable Value Changed Event". It was not hit actually.So i tried using the script task for seeing my variable value.

Did i set the breakpoint correctly...or should i enable the breakpoint for some other event to see the value?

|||

Suganya Mahadevan wrote:

Yes.Am able to see the value of the variable getting changed.I used script task to populate the value of the variable.Its getting set properly.(I am not doing any manipulation inside the script task except trying to populate the value in msg box.)

By the way,I tried enabling the breakpoint on "Variable Value Changed Event". It was not hit actually.So i tried using the script task for seeing my variable value.

Did i set the breakpoint correctly...or should i enable the breakpoint for some other event to see the value?

Put the breakpoint on the OnPreExecute event of the second data-flow.

When it breaks, drag the variable into a Watch window and you will be able to see the value.

-Jamie

|||

Thanks Jamie.The value is getting set.

But flat file is not skipping the number of rows.

Any solution for this?

Regards

Suganya

|||

Can you share the package and the source files? Paste them up here if so.

-Jamie

|||

It is not possible for me to share the package here.Can u give ur mail id so that i could send my package and source code?

-Suganya

changing "header rows to skip" property in flat file connection during runtime

Hi all

I have a flat file.I am trying to set the value for the property "HeaderRowsToSkip" during runtime.I have set an expression for this in my "flat file connection manager". But this is not working.The connection manager is not able to take the value during runtime.

My expression is as follows:

DataRowsToSkip : @.[user:: Var]

where "Var" is my variable which gets the value from the rowcount component and trying to set it back to the "HeaderRowsToskip" property.

I ve even tried setting the value to the "HeaderRowsToSkip" property in the expression builder.

Its not working....

Can anyone help me out in solving this?

Thanks in advance

Regards

Suganya

Is the rowCont component part of the same data flow where your trying to write into the flat file? If so; there might be the problem (no 100% sure); but I am guessing that by the time the flat file connection manager gets 'configured' the rowcount variable has not been populated.

Try moving the logic of the row count to a different dataflow at the beginning of the control flow and see if that helps...

|||

I tried the option which you have mentioned.Its not working...Is there any other way to achieve this?

And what is meant by "flat file connection manager getting configured?".Does it mean that when i start running my package,It sets all the values and during runtime i cant change my connection manager details?.I get this doubt because the connection manager is able to skip the number of rows with the same expression being used and setting the value for the variable which am using in the expression during design time.

Thanks in advance.

Regards,

Suganya

|||

I've just had a go at this and it works fine.

Where is the rowcount component? Is it in the same data-flow?

-Jamie

|||

No...its not in the same dataflow task.As you said in the previous post i have changed it another data flow task.

My package has the following tasks and components

1.Dataflow task(1) containing a flatfile ,a rowcount and an OLE DB destination

2.Dataflow task(2) containing a flat file and an OLE DB destination

Only for the flat file available in the data flow task(2),I have set the expression and am not using the same connection manager which i ve used in the dataflow task(1).

am i doing anything wrong?

Regards,

Suganya

|||

All except one thing. Why have you got a an OLE DB Destination in the first data-flow? Where are you inserting the data to? You can terminate the data-flow with the rowcount compoennt - that seems to be all you need.

-Jamie

|||

Suganya Mahadevan wrote:

I tried the option which you have mentioned.Its not working...Is there any other way to achieve this?

And what is meant by "flat file connection manager getting configured?".Does it mean that when i start running my package,It sets all the values and during runtime i cant change my connection manager details?.

Yes; and the behavior you described proof that. The connection manager gets set up using the available values when the execution starts; at that point he only value available for the rowcount variable is the one given at design time; as no rows have started to flow. That is why I was suggesting moving the rowcount logic to a previous stage.

But I got a question for you; is the row count variable being populated based on the same file you are trying to skip the rows from? That would not cause to skip all the rows every time? (Unless you are using different files)

|||

Its not working.I have removed the OLE DB destination from my dataflow task(1) and now trying to get the rowcount value from dataflow task(1) and set the value to the flat file connection manager's "HeaderRowsToSkip" in dataflow task(2).

My flatfile in dataflow task(1) has 100 records and my flatfile in dataflow task has 5000 records.My rowcount variable in dataflow task(1) has 100 as its value now(as i have 100 records in flatfile).So my flatfile in dataflow task(2) should skip first 100 rows and insert 4900 rows into the destination.But its not working that way.Its inserting all the 5000 records into the destination.

But the same scenario is working when i set the value during design time and i have specified this in my previous post.

|||

No its 2 different files.

My package has the following tasks and components

1.Dataflow task(1) containing a flatfile ,a rowcount and an OLE DB destination

2.Dataflow task(2) containing a flat file and an OLE DB destination

Only for the flat file available in the data flow task(2),I have set the expression and am not using the same connection manager which i ve used in the dataflow task(1).

My flatfile in dataflow task(1) has 100 records and my flatfile in dataflow task has 5000 records.My rowcount variable in dataflow task(1) has 100 as its value now(as i have 100 records in flatfile).So my flatfile in dataflow task(2) should skip first 100 rows and insert 4900 rows into the destination.But its not working that way.Its inserting all the 5000 records into the destination.

What is the problem with my package?

|||

Suganya Mahadevan wrote:

Its not working.I have removed the OLE DB destination from my dataflow task(1) and now trying to get the rowcount value from dataflow task(1) and set the value to the flat file connection manager's "HeaderRowsToSkip" in dataflow task(2).

My flatfile in dataflow task(1) has 100 records and my flatfile in dataflow task has 5000 records.My rowcount variable in dataflow task(1) has 100 as its value now(as i have 100 records in flatfile).So my flatfile in dataflow task(2) should skip first 100 rows and insert 4900 rows into the destination.But its not working that way.Its inserting all the 5000 records into the destination.

But the same scenario is working when i set the value during design time and i have specified this in my previous post.

Could you set a break point in the second dataflow and then execute the package; when it breaks; could you check the value of the rowcount variable to see if it's properly populated?

Let's make sure first the variable is correctly populated...

|||

Yes.Am able to see the value of the variable getting changed.I used script task to populate the value of the variable.Its getting set properly.(I am not doing any manipulation inside the script task except trying to populate the value in msg box.)

By the way,I tried enabling the breakpoint on "Variable Value Changed Event". It was not hit actually.So i tried using the script task for seeing my variable value.

Did i set the breakpoint correctly...or should i enable the breakpoint for some other event to see the value?

|||

Suganya Mahadevan wrote:

Yes.Am able to see the value of the variable getting changed.I used script task to populate the value of the variable.Its getting set properly.(I am not doing any manipulation inside the script task except trying to populate the value in msg box.)

By the way,I tried enabling the breakpoint on "Variable Value Changed Event". It was not hit actually.So i tried using the script task for seeing my variable value.

Did i set the breakpoint correctly...or should i enable the breakpoint for some other event to see the value?

Put the breakpoint on the OnPreExecute event of the second data-flow.

When it breaks, drag the variable into a Watch window and you will be able to see the value.

-Jamie

|||

Thanks Jamie.The value is getting set.

But flat file is not skipping the number of rows.

Any solution for this?

Regards

Suganya

|||

Can you share the package and the source files? Paste them up here if so.

-Jamie

|||

It is not possible for me to share the package here.Can u give ur mail id so that i could send my package and source code?

-Suganya

sql

Monday, March 19, 2012

changeing the table name while using transfer sql server object

Hi,
I am wondering using transfer sql server objects task in a sub-package and feeding tableslist property from the parent package. which works fine.
problem :

I want to be able to change the name in the fly so if I have
TableA I want to copy it for the destination as TableB
is there any work arround this just using transfer sql server objects task.
Thanks

A link to a similar thread of yours on this topic: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1094010&SiteID=1|||Thanks Phil for checking.
Although it is similar question but it is pointing to a different functionality of Transfer sql server object task.
I want to be able to copy a table between servers the tricky part is that I don not have the table in the destination and task creates the table in the target server.

so it captures a snapshot of the schema of the source table and applies it to the remote server and the then standard data copy between to tables.

problem: I want to be able to have a different table name for the target database. so I am wondering if it is possible with scripting to do so ( that is fi the task it self has got such a property ) or the task only will create the table with the same name (as the source).

Thanks
|||Just asking and am not trying to take away from your issue, but aren't there better tools for performing schema management rather than using SSIS? I'm not a DBA, so I don't really know the answer to that question, but it seems here that you're stretching the limits of what SSIS was designed to do (even if it *can* do it).

Are you going to run this one time, or many times?|||many times and con-currently
|||Not supported in the Transfer Objects task. However, you could use an Execute SQL after the table is copied to call sp_rename.|||yes, that's how I've done it , but I was wondering if there was a a nyway to stretch the Transfer sql server object task capability.
Cheers

Saturday, February 25, 2012

Change the "text filegroup" property of an existing table

How can I change the property "text filegroup" of an existing Table?

Thanks
Markus

In enterprise manager, right click the table and choose "design table", then click the "table and index properties" icon (2nd from left, next to save) and then set the Text Filegroup option as appropriate.|||I'm using SQL Server 2005|||right click on the table and select properties. you have the option to change it there.|||at the properties tab, General, everything is write protected (SQL Server Management Studio)|||TextFilegroup is set at the creation of the table via the TextImage_On {fg}. In sql2k, when you modify the TextFilegroup property, the system actually:
1. create a new table with textimage_on
2. insert into the new table with the old table data
3. drop the old table
4. rename the new table to old

The above functionality still exists and works the same in sql2k5. Right click on the table; select "modify"; press F4 to bring up the properties pane; change the TextFilegroup as desired.

Thursday, February 16, 2012

Change query of report in reportviewer

Hi,

I have a reporting services report that i show in an asp.net page by a reportviewer control.

Is there a property that i can set in my asp.net page, to change the query for changing the data in my report.

The number and names of the columns will be the same.

I should work with parameters, but the query changes more than just a few where-clauses. So i think working with parameters looks impossible.

Thanks,

Dennis

Hi,

using parameters is the only way to accomplish it. You can use a stored procedure in conjunction with a parameter which decicde within your stored procedue code which query to execute.

Jens K. Suessmeyer.

http://www.sqlserver2005.de
|||

Excuse me

How Can I do a clr routine with a call to crystal report?

Thanks

Change query of report in reportviewer

Hi,

I have a reporting services report that i show in an asp.net page by a reportviewer control.

Is there a property that i can set in my asp.net page, to change the query for changing the data in my report.

The number and names of the columns will be the same.

I should work with parameters, but the query changes more than just a few where-clauses. So i think working with parameters looks impossible.

Thanks,

Dennis

Hi,

using parameters is the only way to accomplish it. You can use a stored procedure in conjunction with a parameter which decicde within your stored procedue code which query to execute.

Jens K. Suessmeyer.

http://www.sqlserver2005.de
|||

Excuse me

How Can I do a clr routine with a call to crystal report?

Thanks

Change property based on actual state of collapsed/expanded group

Hi, please I would like to use something like this>

=IIF(table1_group2 is Collapsed,True,False)

I want to generated some event based on actual state of e.g. report group. if user expand group make this event otherwise (group is collapsed) make another event.

Thanks for your advice.

Any Answers? Please send me the link where it was disccussed or it's impossible to do it?|||I'm also looking for a similar solution. Any luck?

Sunday, February 12, 2012

Change OracleDataAdapter property

I am getting the following error when trying to run a query against an Oracle DB.

"TITLE: Microsoft Report Designer

An error occurred while reading data from the query result set.
OCI-22053: overflow error

ADDITIONAL INFORMATION:

OCI-22053: overflow error
(System.Data.OracleClient)"

The fix is...


set the ReturnProviderSpecificTypes property of the OracleDataAdapter to true and have it read OracleNumber's instead of System.Decimal, which can't handle the value

I need to know How I can do this.

Using BI tools in sql server 2005

Resolved this by creating the report without previewing then opened the .rdl file in my xml editor and changed the typename value for each System.Decimal


' <rd:TypeName>System.Decimal</rd:TypeName>' to ' <rd:TypeName>OracleNumbers</rd:TypeName>'

then saved as .rdl and opened in reporting services and previewed and works just fine.

|||I'm having a similar issue but I'm processing the cube in a Visual Studio project. Can I make the data type change within the Analysis Services project somewhere?

Change OracleDataAdapter property

I am getting the following error when trying to run a query against an Oracle DB.

"TITLE: Microsoft Report Designer

An error occurred while reading data from the query result set.
OCI-22053: overflow error

ADDITIONAL INFORMATION:

OCI-22053: overflow error
(System.Data.OracleClient)"

The fix is...


set the ReturnProviderSpecificTypes property of the OracleDataAdapter to true and have it read OracleNumber's instead of System.Decimal, which can't handle the value

I need to know How I can do this.

Using BI tools in sql server 2005

Resolved this by creating the report without previewing then opened the .rdl file in my xml editor and changed the typename value for each System.Decimal


' <rd:TypeName>System.Decimal</rd:TypeName>' to ' <rd:TypeName>OracleNumbers</rd:TypeName>'

then saved as .rdl and opened in reporting services and previewed and works just fine.

|||I'm having a similar issue but I'm processing the cube in a Visual Studio project. Can I make the data type change within the Analysis Services project somewhere?

Change of table property

Hi
May I know how can I change the property of a table in SQL.
In my table, I need to allow one of the field to be able to accept null and
the table is not empty. Please help. Thanks
Christina
ALTER TABLE MyTable
ALTER COLUMN ColABC NVARCHAR(20) NULL
Change the Table and column names to yours, and the datatype to what your
existing column is.
NULL can be specified in ALTER COLUMN to make a NOT NULL column allow null
values, except for columns in PRIMARY KEY constraints
Regards
Mike
"Chris" wrote:

> Hi
> May I know how can I change the property of a table in SQL.
> In my table, I need to allow one of the field to be able to accept null and
> the table is not empty. Please help. Thanks
> Christina

Change of table property

Hi
May I know how can I change the property of a table in SQL.
In my table, I need to allow one of the field to be able to accept null and
the table is not empty. Please help. Thanks
ChristinaALTER TABLE MyTable
ALTER COLUMN ColABC NVARCHAR(20) NULL
Change the Table and column names to yours, and the datatype to what your
existing column is.
NULL can be specified in ALTER COLUMN to make a NOT NULL column allow null
values, except for columns in PRIMARY KEY constraints
Regards
Mike
"Chris" wrote:

> Hi
> May I know how can I change the property of a table in SQL.
> In my table, I need to allow one of the field to be able to accept null an
d
> the table is not empty. Please help. Thanks
> Christina

Change of table property

Hi
May I know how can I change the property of a table in SQL.
In my table, I need to allow one of the field to be able to accept null and
the table is not empty. Please help. Thanks
ChristinaALTER TABLE MyTable
ALTER COLUMN ColABC NVARCHAR(20) NULL
Change the Table and column names to yours, and the datatype to what your
existing column is.
NULL can be specified in ALTER COLUMN to make a NOT NULL column allow null
values, except for columns in PRIMARY KEY constraints
Regards
Mike
"Chris" wrote:
> Hi
> May I know how can I change the property of a table in SQL.
> In my table, I need to allow one of the field to be able to accept null and
> the table is not empty. Please help. Thanks
> Christina