I thought a table variable would cure my woes, but that doesn't seem to be a viable option with a bulk insert. I have the following stored procedure that works fine when I execute it (with admin access), but when my user runs it they recieve the following error: "The current user is not the...
Can I bulk insert into a table variable? When I run the following, I recieve a syntax error; however it does work if I create a temp table instead of the variable.
declare @OPLST table(
BATCH varchar(9),
SUBNO varchar(15),
PCNTLNO varchar(38),
CLAIMNO varchar(16),
CPLAN varchar(10)...
I have a UNIX file that I am trying to BULK INSERT, but can't seem to get the correct rowterminator. Each row ends with a LF and I have tried \r, \n, and \r\n, but all return in error. If I replace the LF with CRLF, then it works with '\n', but this is going to be a daily process with some...
I'm doing what I think is a simple Bulk Insert into a table from a tab delimited file.
BULK INSERT dbo.table
FROM '\\server\file.asc'
WITH (FIELDTERMINATOR = '\t',
ROWTERMINATOR = '\n')
The last line of the file contains no data other than what looks like a ^z in some text editors...
This should be simple, but I can't seem to figure it out. I have a command button that kicks off some steps to import a text file. After the file is imported, I then want to query the table to get a count of the number of records in the table and display that count in a message box to the...
I have an inherited table that is going to be used for reporting (will not be updated). It contains over 150 columns. In each of the columns a row might have a "real" value, but could also have a blank or null. I would like to set each of the blank values to null. I can do that with the...
I've inherited a rather large table that has several columns which contain both blank and null values. The table is not updated, just reported against. For consistencies sake, I would like to set all of the blank values to null. Is there an easy way to do this?
Thanks
Sorry if this is simple, but I’m struggling. I have a table called services that contains service data (million+ records) and it has the following columns: ClientID, Service Date, and Service. I’ve been given a second table that contains the same ClientID and has two additional fields: Start...
I have a table that contains a couple of million records. The records are individual services provided by a couple hundred service providers. Most of what I need to review (the table is updated on a weekly basis) revolves around monthly service totals for each of the providers. An example of...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.