Viewing 7 posts - 31 through 37 (of 37 total)
********This is the DDL***************
USE [stgFACTS]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[I353_SalesOrder](
[I353_DATE_TRANSACTION] [decimal](8, 0) NULL,
[I353_TIME_TRANSACTION] [decimal](6, 0) NULL,
CONSTRAINT [PK_I353_SalesOrder] PRIMARY KEY CLUSTERED
(
[I353 _ITEM_NBR] ASC,
[I353...
November 20, 2012 at 8:12 am
Thank you guys for trying to help me out,
I'm trying to get the ddl,insert statements..give me a minute
Thxs
SM
November 20, 2012 at 8:03 am
Lowell,
I tried the following code
select CONVERT (varchar, CONVERT(datetime,STR(MY_COLUMN)),101)
FROM mytable;
It is giving me the following error
Msg 242, Level 16, State 3, Line 1
The conversion of a varchar data type to...
November 19, 2012 at 3:44 pm
Thank you for the reply Lowell,
I was trying to create a view for all the tables.
Could you demostrate how to implement this commoand inside a DDL statement for creating view
Thanks
SM
November 19, 2012 at 3:32 pm
Thank u Sean,
Actually I was trying to create a view ,I can't modify the real table.
SM
November 19, 2012 at 3:28 pm
Hi Sean,
You are right mycolumn is defined as decimal in its DDL statement.
SELECT convert(varchar, mycolumn,101)
FROM Mytable;
that's why the above code is not giving the right result.
COuld...
November 19, 2012 at 3:10 pm
Hi Sean,
You are right mycolumn is defined as decimal in its DDL statement.
Thanks
SM
November 19, 2012 at 3:03 pm
Viewing 7 posts - 31 through 37 (of 37 total)