Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 aiman

Author  Topic 

aiman
Starting Member

18 Posts

Posted - 2007-06-14 : 06:59:23
SQL Server 2000, Query which result will delimate by '!'. It is very urgent and i need your highly support. PLS PLS help me.


Aiman
atik33@yhaoo.com

pbguy
Constraint Violating Yak Guru

319 Posts

Posted - 2007-06-14 : 07:01:54
not clear...post sample data and required outpu

--------------------------------------------------
S.Ahamed
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-06-14 : 07:03:13
quote:
It is very urgent and i need your highly support.


And I highly need clear specifications, sample data and expected output.

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

aiman
Starting Member

18 Posts

Posted - 2007-06-14 : 07:05:46
My Required OutPut like :
QUERY: Select * from Author
Output will be:

Name!FatherName!MotherName ----- Coloumn Name
Aiman!XYZ!Mss Rahim
Karim!KHA!MSS Hena


Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-06-14 : 07:08:41
I will tell you a simple way to do it from query analyzer:

1. Goto Tools, Options, Results tab
2. Select "Results to Text" as Default Results Target combo
3. Select "Custom Delimiter" as Results output format combo
4. Specify ! as delimiter.
5. Tick "Print Column Headers" checkbox.
6. Click on OK

Now run the query and that's it.

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

aiman
Starting Member

18 Posts

Posted - 2007-06-14 : 07:18:22
Harsh Athalye..
Thanks
I am trying to do this . Offcourse i will update u ASAP
Go to Top of Page

aiman
Starting Member

18 Posts

Posted - 2007-06-14 : 07:29:29
I made a *.bat file which will be scheduled to call. within this batch file I wana to Run this Queryr,Format is like <@ECHO OFF
set dir_work=%e:\ftptest\Data_Extract\%osql -L tabstst@TABSUATDB1/writepasswordhere @%dir_work%ISN_GET_WORKCODE_EXTRACT_DHA.sql>

Here "ISN_GET_WORKCODE_EXTRACT_DHA.sql" is my Procedure. which will call remotely.

Is there any way to write direct Query to get this type of Output
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-06-14 : 08:09:08
You need to use BCP tool then.

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2007-06-14 : 11:40:52
bcp "select * from MyDatabase.dbo.MyTable" queryout myfile.txt -t! -c -T -SMYSERVER


elsasoft.org
Go to Top of Page
   

- Advertisement -