Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OpenRowset "Data cutoff"

Status
Not open for further replies.

zzfive03

Programmer
Jun 11, 2001
267
0
0
Hello, I have a query that selects out of a csv file (exported from Active Directory). My query appears to "cutoff" the results of one of my fields after 255 characters.

Is there a way to extend the field so I can get the entire result set?

Here is a code snip of my query:
SELECT *
into #Temp
FROM OpenRowset
(
'MSDASQL',
'Driver={Microsoft Text Driver (*.txt; *.csv)};DefaultDir=C:\',
'select member, dn, mailNickName from aa.csv'
)

The "Member" field cuts off.
 
I have a feeling that if you're viewing it through Querry analyzer, it will cut it off for you automatically. You can increase the cutoff point up to 8k (tools->options->results(tasb)->Maximum characters per column(text box).

What happens if you do:

SELECT datalength(member)
FROM OpenRowset
(
'MSDASQL',
'Driver={Microsoft Text Driver (*.txt; *.csv)};DefaultDir=C:\',
'select member, dn, mailNickName from aa.csv'
)
 
Hum, when I type that, i just get a lot of NULL'S. I will try expanding my query options.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top