tanj1035
asked on
sql, how to change the data type after data loading?
hi Experts,
I have loaded an excel file in the database by using sql import wizard. It automatically generated a table, like below.
After I loaded all data in this table, and I want to change data type for a few fields, the expected table structure will be like below.
Can you help me on it? Thanks.
I have loaded an excel file in the database by using sql import wizard. It automatically generated a table, like below.
CREATE TABLE [dbo].[tblCSOMonthlyLCDetail](
[ContractString] [nvarchar](255) NULL,
[LoanStoreID] [float] NULL,
[CustomerFirstName] [nvarchar](255) NULL,
[CustomerLastName] [nvarchar](255) NULL,
[LoanDate] [datetime] NULL,
[OPB] [money] NULL,
[Score] [float] NULL,
[CSOFees] [money] NULL,
[LienFees] [money] NULL,
[LateFees] [money] NULL,
[Renews] [float] NULL,
[Dayslate] [float] NULL,
[MarkerID] [float] NULL,
[FileDate] [datetime] NULL
) ON [PRIMARY]
GO
After I loaded all data in this table, and I want to change data type for a few fields, the expected table structure will be like below.
CREATE TABLE [dbo].[tblCSOMonthlyLCDetail](
[ContractString] [nvarchar](255) NOT NULL,
[LoanStoreID] [int] NULL,
[CustomerFirstName] [nvarchar](255) NULL,
[CustomerLastName] [nvarchar](255) NULL,
[LoanDate] [datetime] NULL,
[OPB] [money] NULL,
[Score] [int] NULL,
[CSOFees] [money] NULL,
[LienFees] [money] NULL,
[LateFees] [money] NULL,
[Renews] [bit] NULL,
[Dayslate] [int] NULL,
[MarkerID] [int] NULL,
[FileDate] [datetime] NULL
) ON [PRIMARY]
GO
Can you help me on it? Thanks.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you, guys, for alternative solutions!!!
HUH! Everybody got points except me! Wonder why!
ASKER
hi , Huseyin, sorry, I may miss selecting your solution. Is there any way I can change it? Please let me know. I apologize for it :(
>Is there any way I can change it?
You should have a button with three dots on it that has 'Request Attention' as a choice. Select that and ask that the question be re-opened for a regrade. Happens all the time, so not a big deal.
You should have a button with three dots on it that has 'Request Attention' as a choice. Select that and ask that the question be re-opened for a regrade. Happens all the time, so not a big deal.
design
do the required changes and save/close
if you get error, go to tools-options-designers and uncheck "prevent..." see attachmeent...
Screenshot---2017-05-09---1_58_54-PM.png