Home » RDBMS Server » Server Utilities » SQL Loader - load a file with a fixed value passed as parameter
SQL Loader - load a file with a fixed value passed as parameter [message #244793] Thu, 14 June 2007 02:25 Go to next message
ShaShalini
Messages: 59
Registered: January 2007
Member
Hello

I am using sql loader to load a text file in a temporary table . My problem is that the file does not contain one field. But from my application I can get the value of the field to be inserted in the table.

e.g I have table Temp_hs
( CompanyId Varchar2(10),
Name Varchar2(35),
Address1 Varchar2(35) );

But the file being provided for a particular company has only name and address. I want to load the company name also in the table.

Any idea how I can pass the company Id value for sqlloader to insert it in the temp table.

Thanks
Re: SQL Loader - load a file with a fixed value passed as parameter [message #244815 is a reply to message #244793] Thu, 14 June 2007 03:09 Go to previous messageGo to next message
Michel Cadot
Messages: 68665
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Have a look at Setting a Column to a Constant Value

Regards
Michel
Re: SQL Loader - load a file with a fixed value passed as parameter [message #244819 is a reply to message #244793] Thu, 14 June 2007 03:12 Go to previous messageGo to next message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

Hi,
YOu can use SEQUENCE for company id field.
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96652/ch10.htm#1006946


check above link

Regards
Taj
Re: SQL Loader - load a file with a fixed value passed as parameter [message #244839 is a reply to message #244815] Thu, 14 June 2007 05:04 Go to previous message
ShaShalini
Messages: 59
Registered: January 2007
Member
Hi



It works with CONSTANT

Thanks
Previous Topic: received ora-30036
Next Topic: Problems with import
Goto Forum:
  


Current Time: Mon Jul 01 08:23:20 CDT 2024