delimited

Dynamic SQL Comma-Delimited Value Query

我是研究僧i 提交于 2019-12-01 06:04:44
问题 [Update: Using SQL Server 2005] Hi, what I want to do is query my stored procedure with a comma-delimited list of values (ids) to retrieve rows of data. The problem I am receiving is a conversion error: Conversion failed when converting the varchar value ' + @PassedInIDs + ' to data type int. The statement in my where-clause and error is: ... AND (database.ID IN (' + @PassedInIDs + ')) Note: database.ID is of int type. I was following the article at: http://www.sql-server-helper.com/functions

How can I get 2nd and third column in tab delim file in bash?

落爺英雄遲暮 提交于 2019-11-30 12:57:15
问题 I want to use bash to process a tab delimited file. I only need the second column and third to a new file. 回答1: cut(1) was made expressly for this purpose: cut -f 2-3 input.txt > output.txt 回答2: Cut is probably the best choice here, second to that is awk awk -F"\t" '{print $2 "\t" $3}' input > out 回答3: expanding on the answer of carl-norum, using only tab as a delimiter, not all blanks: cut -d$'\t' -f 2-3 input.txt > output.txt don't put a space between d and $ 来源: https://stackoverflow.com

Linq query with subquery as comma-separated values

妖精的绣舞 提交于 2019-11-30 04:58:22
问题 In my application, a company can have many employees and each employee may have have multiple email addresses. The database schema relates the tables like this: Company -> CompanyEmployeeXref -> Employee -> EmployeeAddressXref -> Email I am using Entity Framework and I want to create a LINQ query that returns the name of the company and a comma-separated list of it's employee's email addresses. Here is the query I am attempting: from c in Company join ex in CompanyEmployeeXref on c.Id equals

T-SQL How to convert comma separated string of numbers to integer

血红的双手。 提交于 2019-11-29 15:00:35
I get the error "Conversion failed when converting the nvarchar value '23,24,3,45,91,' to data type int." The error seems to be occuring on the ON clause. E.ID is an integer field while F.LegalIssue is a varchar field of integers separated by commas. Below is the code with that error. SELECT F.[FDTitle], E.PrimaryOpID as [FD Primary OP ID], F.County as [FD County], F.Status as [FD Status], F.IssueDate as [FD Date] FROM [dbo].[tbl_FinalDetMain] F LEFT OUTER JOIN [dbo].[tbl_lk_Exemptions_FD] E ON E.ID = F.LegalIssue WHERE F.[FDNbr] = '2013-0041' I have tried the code below for the on clause, but

T-SQL How to convert comma separated string of numbers to integer

蓝咒 提交于 2019-11-28 09:06:12
问题 I get the error "Conversion failed when converting the nvarchar value '23,24,3,45,91,' to data type int." The error seems to be occuring on the ON clause. E.ID is an integer field while F.LegalIssue is a varchar field of integers separated by commas. Below is the code with that error. SELECT F.[FDTitle], E.PrimaryOpID as [FD Primary OP ID], F.County as [FD County], F.Status as [FD Status], F.IssueDate as [FD Date] FROM [dbo].[tbl_FinalDetMain] F LEFT OUTER JOIN [dbo].[tbl_lk_Exemptions_FD] E

Reading text file with multiple space as delimiter in R

妖精的绣舞 提交于 2019-11-28 05:12:59
I have big data set which consist of around 94 columns and 3 Million rows. This file have single as well as multiple spaces as delimiter between columns. I need to read some columns from this file in R. For this I tried using read.table() with options which can be seen in the code below, the code is pasted below- ### Defining the columns to be read from the file, the first 5 column, then we do not read next 24, after this we read next 5 columns. Last 60 columns are not read in- col_classes = c(rep("character",2), rep("numeric", 3), rep("NULL",24), rep("numeric", 5), rep("NULL", 60)) ###

Ways to read only select columns from a file into R? (A happy medium between `read.table` and `scan`?) [duplicate]

流过昼夜 提交于 2019-11-27 17:23:48
This question already has an answer here: Only read selected columns 3 answers I have some very big delimited data files and I want to process only certain columns in R without taking the time and memory to create a data.frame for the whole file. The only options I know of are read.table which is very wasteful when I only want a couple of columns or scan which seems too low level for what I want. Is there a better option, either with pure R or perhaps calling out to some other shell script to do the column extraction and then using scan or read.table on it's output? (Which leads to the

Reading text file with multiple space as delimiter in R

左心房为你撑大大i 提交于 2019-11-27 05:31:04
问题 I have big data set which consist of around 94 columns and 3 Million rows. This file have single as well as multiple spaces as delimiter between columns. I need to read some columns from this file in R. For this I tried using read.table() with options which can be seen in the code below, the code is pasted below- ### Defining the columns to be read from the file, the first 5 column, then we do not read next 24, after this we read next 5 columns. Last 60 columns are not read in- col_classes =