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)
 Spliting data in column

Author  Topic 

m2diwa@gmail.com
Starting Member

3 Posts

Posted - 2006-03-24 : 03:57:50
hai all,
This is my first question to this forum.
here is my situtation:
I am into report testing I need to test a report for which i have write a query,iam using qery analyser for runing query


Database : sql server
tabel name :job_allocations
column naME :technicain code

Based on techincain code in joballocation tablei need to get technician cost from other table for the particular technician.

Based on the technician code user chooses column will be updated
if single data will be TC01
if more than one then data will be TC01:TC02:TC03

user can choose any number of techincian for a job

MY problem is :How to split tha when there is multiple technician and calculate cost for the job
Ineed it in single excecution query

Table structure

job_allocation table

jobcardn_fk Technician_code
jc01 TC01
jc02 Tco1:Tco2:Tc03......


I need it in



jobcardno_fk TEchnician_code
jco1 Tc01
jco2 Tc01
jco2 TC02
jc02 Tc03




TKs ands Regards
Diwakar.R


afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2006-03-24 : 04:30:46
Welcome to SQLTeam
Read up on CSV and split function

see here for split function
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=50648

Afrika
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-03-24 : 04:48:24
Also refer
http://www.sqlteam.com/item.asp?ItemID=2652

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -