Denise,
Does the user who execute the openrowset script should have bulk insert permission also...
If NO how we do specify in the script to read the all files dynamically from the directory instead of one file(somefile) in the select script..
I got the appropariate access..
Now i got the below error on executing the bulk insert..
Could not bulk insert because file 'mycomputername\\c:\test.txt' could not be opened. Operating system error code 123(The filename, directory name, or volume label syntax is incorrect.).
Executed Scripts...
Thanks Michael...
Suggest me the other alternatives where i can't use DTS,
BCP,Bulk insert..Since i dont have permissions execute on Master Db..Since i have to use Xp_shell commands for bulk insert.. and File system for DTS..
Please help me in writing a query to import the comma separated data in a text file to sqlserver 2000.
Below is the sample data from the text file.
100,1,xx,yy,20030101
100,2,21,t4,20030101
100,3,2p,01,20030101
100,1,xx,yy,20030102
100,2,21,t5,20030102
100,3,2p,01,20030102
I want the output...
Thanks alex!!
yr query works fine..
How about below query which also works but do yu see any problems with the below query
select id = coalesce(a.id, b.id), a.emp, a.city, b.gender, b.age
from tablea a full outer join tableb b
on a.id = b.id
I have a written a query which is not producing the desired output.Please help me in getting the output.
select b.id,emp,city,gender,age from tablea a full outer join tableb b on a.id=b.id
Tablea
------
id emp city
------------ --------------------...
Please give me your valuable suggestions for the below sceniaro.
We will get a flatfiles every day which i need to export the data into sqlserver 2000.The flat files which may contains more than 350 columns some of columns data may be nulls.
What is the best way to address the above scenario...
Thanks for the response.
I was told to design the data flow for the below sceniario..
We have Branch offices in different locations which will uses an application to create the raw data to flat file.Which BO(Branch office) in turn send the flat files (.csv) to our head office.
What is the best...
I am getting the desired output with the below query..
select p1.Csid, p1.sid,
prod2 = case
when max(p3.prod3) = 'A1' then 'A1'
when count(*) > 1 then '4'
when max(p2.Prod2) = 'T5' then '1'
when max(p2.Prod2) = 'T3' then '2'
when max(p2.Prod2) = 'T1' then '5'
else max(p2.Prod2) end
,p3.prod3...
I need the help in getting the output.
if A1 exists in the @prod3 table then the @prod2 table prod2 value for the respective sid should be A1
Please help me in getting the desired output.thanks for yur help in advance..
declare @Prod1 table
(
Csid bigint,
sid bigint
)
insert into @Prod1...
I want to export the data to a file with space separated.
Ex:
Location Length
-------- ------
Col1value 1 10
Column2 12 2
Col3value 18 3
Please help me.I did tried by enabling in the tools- options-results tab.
I want to rename the column name of the table which contains data and also i want to check and replace the column name in the stored procedures(50), views(20) and some triggers. Please suggests me the best way to replace it .
One way is to generate the scripts and find & replace( CTRL H)with...
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.