Computing.Net > Forums > Programming > Help in SQL

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Help in SQL

Reply to Message Icon

Name: jds
Date: April 15, 2004 at 11:04:30 Pacific
OS: windows2000
CPU/Ram: petium II/ram 256
Comment:

Hi,
I am new in SQL. I need someone's help.
I have table which contains:
userID, group
123 1
234 2
345 1
456 3
...
I want to write a query which can base on group write into different files like group 1 to file1, group2 to file2
How can I get this done.
Any help would be appreciated



Sponsored Link
Ads by Google

Response Number 1
Name: Farnoush Hakakian
Date: April 15, 2004 at 11:08:46 Pacific
Reply:

If the number of groups are not that many, you can run the query for each group and save it and make the changes for the next group, run the query and save it and so on.

Farnoush Hakakian


0

Response Number 2
Name: jds
Date: April 15, 2004 at 12:46:43 Pacific
Reply:

Thanks for your response Farnoush.
The thing is this is the first step. I need base on the file created by this query do some other stuff after. So I need to make it automated. besides, I got many groups can't do it manually.


0

Response Number 3
Name: gpp
Date: April 15, 2004 at 13:53:02 Pacific
Reply:

You probably need to write a script to do this then. You can loop thru the result set and based on the group, write to a certain file.


0

Response Number 4
Name: jds
Date: April 15, 2004 at 13:57:46 Pacific
Reply:

You mean sql script or DOS script? could you show me how?.Thx


0

Response Number 5
Name: gpp
Date: April 15, 2004 at 14:23:25 Pacific
Reply:

I was thinking more on the lines of perl.. but I'll have to post something for you tomorrow, I need to get going.


0

Related Posts

See More



Response Number 6
Name: jds
Date: April 19, 2004 at 14:22:21 Pacific
Reply:

Perl would also be good as I am learning that too. Thanks


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Help in SQL

SQL Server Help www.computing.net/answers/programming/sql-server-help/10797.html

Limit obs in SQL www.computing.net/answers/programming/limit-obs-in-sql/6562.html

Counting in SQL www.computing.net/answers/programming/counting-in-sql/6261.html