Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET SQL-Server
I run R language to generate data and need to load this data automatically automatically in SQL Server.Is this possible?
Posted 21-Jan-13 4:00am
KORCARI528
Comments
digimanus at 21-Jan-13 10:19am
   
what have you tried?

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

I like to store stuff in SQL Server tables. Data can be just about anything and it can be stored using TSQL in numerous stages of conversion in a table. Large storage is available in ntext, binary, varbinary, etc ...
 
But first you've gotta load ... it.
CREATE SCHEMA [rdata]
CREATE TABLE [database].[rdata].[rfile](
   [strR][nvarchar](MAX}
   )
CREATE TABLE [database].[rdata].[rfileIdx](
   [idx][int]IDENTITY(1,1)
       [strR][nvarchar](MAX)
   )
BULK INSERT [database].[rdata].[rfile]
'c:\R_data_output\filename.rrr'
 
INSERT INTO [database].[rdata].[rfileIdx]
   SELECT [strR] FROM [database].[rdata].[rfile]
If all goes well, you'll receive no red error messages and you'll have lines of "data" in an indexed table. I'll wager you'll run into the single line table next ...
  Permalink  
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web02 | 2.8.140926.1 | Last Updated 21 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100