Monday, March 6, 2017

stocks

creating a stocks and shares database I will be looking to build a stocks database and asp frontend


USE [stock]GO/****** Object: Table [dbo].[techdbo$] Script Date: 07/22/2012 09:29:03 ******/SET
GO
SET
GO
CREATE
ANSI_NULLS ON QUOTED_IDENTIFIER ON TABLE [dbo].[techdbo$]([SymbolID] [float] NULL,[Ticker] [nvarchar](255) NULL,[Exchange] [nvarchar](255) NULL,[ComGroup] [nvarchar](255) NULL,[Continent] [nvarchar](255) NULL,[Stage] [nvarchar](255) NULL,[MI] [float] NULL,[Inf] [float] NULL,[PP] [float] NULL,[Production] [float] NULL,[Cash Cost] [float]
)
NULL ON [PRIMARY]GOUSE
[stock]GO/****** Object: Table [dbo].[symboldbo$] Script Date: 07/22/2012 09:28:43 ******/SET
GO
SET
GO
CREATE
ANSI_NULLS ON QUOTED_IDENTIFIER ON TABLE [dbo].[symboldbo$]([SymbolID] [float] NULL,[Ticker] [nvarchar](255) NULL,[Exchange] [nvarchar](255) NULL,[CoName] [nvarchar]
)
(255) NULL ON [PRIMARY]GOUSE
[stock]GOUSE [stock]GO/****** Object: Table [dbo].[Exchange] Script Date: 07/22/2012 09:27:36 ******/USE [stock]GO/****** Object: Table [dbo].[Symbol] Script Date: 07/22/2012 09:28:23 ******/SET
GO
SET
GO
SET
GO
CREATE
ANSI_NULLS ON QUOTED_IDENTIFIER ON ANSI_PADDING ON TABLE [dbo].[Symbol]([SymbolID] [int] NULL,[Ticker] [varchar](50) NULL,[Exchange] [varchar](50) NULL,[CoName] [varchar](max) NULL,[Target] [varchar](50) NULL,[PConame] [varchar](50) NULL,[ErrorInd] [nchar](10) NULL,[MarketCap] [decimal](18, 0) NULL,[Bid] [decimal](18, 0) NULL,[Ask] [decimal](18, 0) NULL,[Open] [decimal](18, 0) NULL,[High] [decimal](18, 0) NULL,[Low] [decimal](18, 0) NULL,[Ch] [nvarchar](50) NULL,[52high] [decimal](18, 0) NULL,[52low] [decimal](18, 0) NULL,[ch50dmav] [varchar](50) NULL,[ch200dmav] [varchar](50) NULL,[vol] [decimal](18, 0) NULL,[AvDvol] [decimal](18, 0) NULL,[shortratio] [decimal](18, 0) NULL,[DivShare] [decimal](18, 0) NULL,[DivYield] [decimal](18, 0) NULL,[Exdivdate] [date] NULL,[DivPaydate] [date] NULL,[BookV] [decimal](18, 0) NULL,[PSales] [decimal](18, 0) NULL,[PBook] [decimal](18, 0) NULL,[PEration] [decimal](18, 0) NULL,[Cash] [decimal](18, 0) NULL,[Debt] [decimal](18, 0) NULL,[EV] [decimal]
)
(18, 0) NULL ON [PRIMARY]GO
SET
GO
ANSI_PADDING OFFUSE
[stock]GO/****** Object: Table [dbo].[Stage] Script Date: 07/22/2012 09:28:07 ******/SET
GO
SET
GO
SET
GO
CREATE
ANSI_NULLS ON QUOTED_IDENTIFIER ON ANSI_PADDING ON TABLE [dbo].[Stage]([StageID] [int] NULL,[Stage] [varchar]
)
(50) NULL ON [PRIMARY]GO
SET
GO
ANSI_PADDING OFF[stock]GO/****** Object: Table [dbo].[Provider] Script Date: 07/22/2012 09:27:51 ******/SET
GO
SET
GO
SET
GO
CREATE
ANSI_NULLS ON QUOTED_IDENTIFIER ON ANSI_PADDING ON TABLE [dbo].[Provider]([ProviderID] [int] NULL,[Provider] [varchar]
)
(50) NULL ON [PRIMARY]GO
SET
GO
ANSI_PADDING OFFSET
GO
SET
GO
SET
GO
CREATE ANSI_NULLS ON QUOTED_IDENTIFIER ON ANSI_PADDING ON TABLE [dbo].[Exchange]([ExchangeID] [int] NOT NULL,[Exchange] [varchar](50) NOT NULL,[ProviderD] [int] NULL,[Yahoo] [varchar](50) NULL,[Google] [varchar](50) NULL,[Reuters] [varchar](50) NULL,[CurrencyID] [int]
)
NULL ON [PRIMARY]GO
SET
GO
ANSI_PADDING OFF/****** Object: Table [dbo].[Currency] Script Date: 07/22/2012 09:27:18 ******/SET
GO
SET
GO
SET
GO
CREATE
ANSI_NULLS ON QUOTED_IDENTIFIER ON ANSI_PADDING ON TABLE [dbo].[Currency]([CurrencyID] [int] NULL,[Currency] [varchar](50) NULL,[ProviderID] [int] NULL,[Yahoo] [varchar](50) NULL,[Google] [varchar](50) NULL,[Reuters] [varchar]
)
(50) NULL ON [PRIMARY]GO
SET
GO
ANSI_PADDING OFFUSE [stock]GO/****** Object: Table [dbo].[continent] Script Date: 07/22/2012 09:26:54 ******/SET
GO
SET
GO
SET
GO
CREATE
ANSI_NULLS ON QUOTED_IDENTIFIER ON ANSI_PADDING ON TABLE [dbo].[continent]([continentID] [int] NULL,[Continent] [varchar]
)
(50) NULL ON [PRIMARY]GO
SET
GO
ANSI_PADDING OFFUSE [stock]GO/****** Object: Table [dbo].[comgroup] Script Date: 07/22/2012 09:26:30 ******/SET
GO
SET
GO
SET
GO
CREATE
ANSI_NULLS ON QUOTED_IDENTIFIER ON ANSI_PADDING ON TABLE [dbo].[comgroup]([comgroupID] [int] NULL,[ComGroup] [varchar]
)
(50) NULL ON [PRIMARY]GO
SET
GO
ANSI_PADDING OFFinsert into dbo.Symbol values ('1, [Exxon Mobil Corpo], [N/A], 67.03, [N/A], [N/A], 86.02, 86.38, 85.62,0.00,87.94,67.03,'+4.17%','+1.95%', 14902213,18142400,1.60,1.98,2.30, '2012-07-20', '2012-07-20',33.577,0.91,2.57,10.41')select @@GETDATE())declare
set
@date datetime @date = getdate()select @date
insert into Currency values ( 1,'AUD',1,'AUDUSD=X','CURRENCY:AUD','AUD/USD')insert into Currency values ( 2,'USD',1,'USDUSD=X', 'CURRENCY:USD','USD/USD')insert into Currency values ( 3,'CAD',1,'CADUSD=X','CURRENCY:CAD','CAD/USD')insert into Currency values ( 4,'GBP',1,'GBPUSD=X','CURRENCY:GBP','GBP/USD')insert into Currency values ( 5,'EUR',1,'EURUSD=X','CURRENCY:EUR','EUR/USD')insert into Currency values ( 6,'HKD',1,'HKDUSD=X','CURRENCY:HKD','HKD/USD')insert into Currency values ( 7,'CNY',1,'CNYUSD=X','CURRENCY:CNY','CNY/USD')insert into Currency values ( 8,'BRL',1,'BRLUSD=X','CURRENCY:BRL','BRL/USD')insert into Currency values ( 9,'ZAR',1,'ZARUSD=X','CURRENCY:ZAR','ZAR/USD')insert into Currency values ( 10,'SGD',1,'SGDUSD=X','CURRENCY:SGD','SGD/USD')go
insert
into Provider values (1,'Yahoo')insert into Provider values (2,'Google')insert into Provider values (3,'Reuters')insert into Provider values (4,'Bloomberg')go
insert
into Exchange values (1, 'ASX',1,'.AX','ASX:','.AX', 1)insert into Exchange values (2, 'NYSE', 1, '','NYSE:','.N', 2)insert into Exchange values (3,'OTC',1, '' ,'PINK:','.PK',2)insert into Exchange values (4,'NASDAQ', 1, '' ,'NASDAQ:','.O',2)insert into Exchange values (5,'TSX', 1, '.TO', 'TSE:','.TO',3)insert into Exchange values (6,'TSXVCDNX', 1, '.V', 'CVE:','.V',3)insert into Exchange values (7,'LSE', 1, '.L', 'LON:','.L',4)insert into Exchange values (8,'AIM', 1, '.L', 'LON:','.L',4)insert into Exchange values (9,'HKSE', 1, '.HK','HKG:','.HK',6)insert into Exchange values (10,'Bovespa', '','NS','NS','.SA',8)insert into Exchange values (11,'JSE', '','NS','NS','.J',9)insert into Exchange values (12,'SGX', 1,'.SI','SGX:','.SI',10)go
insert
into stage values (1,'Production')insert into stage values (2,'Development')insert into stage values (3,'Feasibility')insertinto stage values (4,'Exploration')insert into comgroup values (1,'DivMaj')insert into comgroup values (2,'DivMin')insert into comgroup values (3,'CopperMaj')insert into comgroup values (4,'CopperMin')insert into comgroup values (5,'GoldMaj')insert into comgroup values (6,'GoldMin')insert into comgroup values (7,'Silver')insert into comgroup values (8,'IronOre')insert into comgroup values (9,'Steel')insert into comgroup values (10,'Royalty')insert into comgroup values (11,'Diamonds')insert into comgroup values (12,'CoalCok')insert into comgroup values (13,'CoalTherm')insert into comgroup values (14,'Uranium')insert into comgroup values (15,'Potash')insert into comgroup values (16,'Nickel')insert into comgroup values (17,'Zinc')insert into comgroup values (18,'Oil')insert into comgroup values (19,'Gas')insert into comgroup values (20,'Test')go
insert
into continent values (1,'Africa')insert into continent values (2,'FSU')insert into continent values (3,'NAmerica')insert into continent values (4,'SAmerica')insert into continent values (5,'Asia')insert into continent values(6,'Aus')insert into continent values(7,'Europe')insertinto continent values(8,'Global')

No comments:

Post a Comment