Showing posts with label design. Show all posts
Showing posts with label design. Show all posts

Sunday, March 25, 2012

Changing the design from char to datetime

I accidently put char instead of datetime in the Sql Server DateCreateddataType. Is there any way that now I can change. I guess even if Ichange I cannot get the time and date in a format that I want sincethey are in Char datatype.

you can change it in the design view or use the ALTER Table commandfrom thw Query analyzer. You can still change the datatype and be ableto use the datetime functions.
|||The problem is that the data in those fields have already been entered.And when I change it is not complient with the old data.

Tuesday, March 20, 2012

Changing table name at runtime ?

Hye,

My report was design on a Access DB (MyDB.mdb, table = Customer).

I want my report retrieve data from another table (XCustomer) with the same design as Customer but I can't change the table name at runtime...
If I have a table Customer on my SQL database all works fine but impossible with XCustomer !!! :ehh:

I've try with SetTableLocation but it doesn't works :mad:

So what can I do ?

Thank for your helpYou need to create other report designed using XCustomer and call it

Saturday, February 25, 2012

Changing nVarChar lengths

I have a db with about 6.5 million records. A few
records have a set number of characters, however the
table design specifies more characters than is really
necessary. I'd like to reclaim as much space as
possible. Am I safe to change the field lengths for the
Char fields to the maximum number of characters I know
they will ever contain, without losing any data? Will I
have to change to nVarChar? If so, any data loss?If your sure the new size is larger than the largest piece of data for any
row you should not have a problem in changing it from a database standpoint.
But you may break existing code or apps if you do. That depends on how they
use it etc.
--
Andrew J. Kelly
SQL Server MVP
"Mike" <tatemike44@.hotmail.com> wrote in message
news:033201c36e6e$8574ad20$a401280a@.phx.gbl...
> I have a db with about 6.5 million records. A few
> records have a set number of characters, however the
> table design specifies more characters than is really
> necessary. I'd like to reclaim as much space as
> possible. Am I safe to change the field lengths for the
> Char fields to the maximum number of characters I know
> they will ever contain, without losing any data? Will I
> have to change to nVarChar? If so, any data loss?