prabhu
Posts: 9
Joined: Mon Sep 08, 2014 6:39 am

An object or column name is missing or empty

I am running a bulk insert sql script
Ex:
BULK
INSERT [PostcodeLookupDetail]
FROM 'C:\Users\Srinivas\Documents\Compass\SQL\LocationData\AU_complete.txt'
WITH
(
FIRSTROW = 2,
FIELDTERMINATOR = ';',
ROWTERMINATOR = '\n'
)
GO

I am replacing the txt file location with ' Sript Replacements' as
Find What Replace with
C:\Users\Srinivas\Documents\Compass\SQL\LocationData\AU_complete.txt [MY_CompletetxtFile]

MY_CompletetxtFile is a temporary file which is located in C:\Users\prabhu\AppData\Local\Temp\AU_complete.txt

My problem is when i run the script through advanced installer I am getting
An object or column name is missing or empty. For SELECT INTO statements, verify each column has a name. For other statements, look for empty alias names. Aliases defined as "" or [] are not allowed. Change the alias to a valid name.

When I run the same script in sql server it works fine. Please Suggest me If I do any thing wrong.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: An object or column name is missing or empty

Hello,

I apologize for my delayed reply.

Can you please send us the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com so we can investigate them and also test your scenario?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
prabhu
Posts: 9
Joined: Mon Sep 08, 2014 6:39 am

Re: An object or column name is missing or empty

It's okay Daniel I have found the issue

I replace the script replacements using

SqlScript
'C:\Users\Srinivas\Documents\Compass\SQL\LocationData\AU_complete.txt'

ScriptReplacements
'MY_CompletetxtFile '

It resolves the issue
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: An object or column name is missing or empty

I'm glad you got this working.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”