问题描述
创建表学生
(
名称varchar(50),
ID bigint,
EmailId varchar (50),
ContactInfo bigint,
域名varchar(50)
)
假设我将Domain声明为CS默认值。
我现在使用BULK INSERT命令传递值
BULK INSERT学生来自(文本文件路径)
批量插入我收到数据..但我想要单独的脚本
文本文件包含
Gaurav,231535,gaurav @ xyz.com
Saurabh,235315,saurabh @ xyz.com
我想为每一行创建单独的脚本动态。
CREATE TABLE STUDENT
(
Name varchar(50),
ID bigint,
EmailId varchar(50),
ContactInfo bigint,
Domain varchar(50)
)
Lets suppose i am declaring Domain as CS for Default.
I am now passing values using BULK INSERT Command
BULK INSERT STUDENT FROM (path of text file)
By bulk Insert I am getting data..But i want individual scripts for
Text file contains
Gaurav,231535,[email protected]
Saurabh,235315,[email protected]
I want individual scripts for Each row which should be created dynamically.
推荐答案
这篇关于我想从文本文件中读取一些数据并插入表中..想要生成动态的sql插入脚本,即的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!