Viewing 13 posts - 1 through 13 (of 13 total)
Thanks Adams for your help.
I've solved my problem.
I don't know why, but some indexes of my SQL2005 DB listed in sys.objects have the field parent_object_id = 0 in sys_objects.
That why...
March 25, 2008 at 4:38 am
Yes I don't need the table name (c.name)
But I need the indexe name (b.name)
However, with your request, the field b.name is returned with NULL value for the indexes which are...
March 21, 2008 at 10:35 am
Thanks for your interest in my problem.
Your proposition is near the final solution.
But when I execute this query, the name of the indexes who are not in sys.sysobjects is returned...
March 21, 2008 at 10:24 am
In sysindexes table the Id of my index is :
select indid from sys.sysindexes where name='My_index_name'
>>> 11
What is a "lob" and a "heap" ?
littlesquall
March 21, 2008 at 10:02 am
Hey Colin,
thanks for your code
I stay on my position and I will implemente the SP_OAmethod solution to write my query result in an output file.
However, to make this possible, I...
December 3, 2007 at 12:03 pm
Colin,
Thanks for your propose.
To answer you I've no explanation of why the result is returned in that format in the output file.
I don't want add a process at the end...
November 28, 2007 at 1:40 am
When you write the result of a "select * from..." in an output file with xp_cmdShell command, the result is saved like in the exemple.
It's an exemple of what I...
November 26, 2007 at 6:36 am
Thanks Jeff,
Maybee I will retry with xp_cmdshell command.
The problem of using this method is not really for security reason because I'm sure that no SQL DBA will review my code.
But...
November 23, 2007 at 6:29 am
Yes Ramesh,
it's approximatively the code that I've done.
But I don't want to precise all the field of each tables because each table that I want to return in the output...
November 23, 2007 at 6:19 am
Of course ahmed,
With the editor used, it can appears on multiple lines. It's not really a problem...
But I can't use like "OSQL ... -o C:\Output.txt" does.
The result of a select...
November 22, 2007 at 6:40 am
Thanks Ahmed,
The 1st method with xp_cmdshell cannot be used because of security method.
With the second one (with execute @OLEResult = sp_OAMethod @FileID ,'WriteLine', Null, @STR)
I don't arrive...
November 22, 2007 at 1:40 am
As I've explain in my first post, I can't use this method for security reason.
Maybee an other one ?
November 21, 2007 at 8:30 am
Thanks Ahmed
I've already tried this method
osql -E -d NOMADE -S (local) -Q "select * from MyTable where ..." -o C:\File.txt
But I can't launch the command from a cmd window....
November 21, 2007 at 6:08 am
Viewing 13 posts - 1 through 13 (of 13 total)