Click here to Skip to main content
15,887,214 members
Home / Discussions / Database
   

Database

 
Questionremove a datatable from a dataset Pin
webx1011-Nov-05 10:34
webx1011-Nov-05 10:34 
Questionconnection problem Pin
ashee200011-Nov-05 9:04
ashee200011-Nov-05 9:04 
AnswerRe: connection problem Pin
Colin Angus Mackay11-Nov-05 12:01
Colin Angus Mackay11-Nov-05 12:01 
GeneralRe: connection problem Pin
ashee200014-Nov-05 7:16
ashee200014-Nov-05 7:16 
AnswerRe: connection problem Pin
ricardojb14-Nov-05 17:25
ricardojb14-Nov-05 17:25 
QuestionPassing parameter to Oracle Pin
softty11-Nov-05 8:42
softty11-Nov-05 8:42 
AnswerRe: Passing parameter to Oracle Pin
anandss11-Nov-05 9:18
anandss11-Nov-05 9:18 
QuestionSQL SPLIT INSERT AND JOIN.... Pin
ModuleKev11-Nov-05 2:13
ModuleKev11-Nov-05 2:13 
I found a really cool function at http://www.devx.com/tips/Tip/20009.

You pass in in a string with what it's deliminated by and it returns a temp table variable of all of the data split into rows..

i.e

select * from fn_SplitByID('oranges|apples|pears|lemons','|')

1 Oranges
2 Apples
3 Pears
4 Lemons

All really nice and pretty. The trouble is I have a table products (around 2000 rows). Each has a product_code (varchar(255) primary key), stock level (int), with a description field that contains deliminated text 'blue|green|pink' (varchar(255)), etc.

I want to extract and split the data into a whole new table:

product_id product_code stock_level description
1 ABC NULL BLUE
2 ABC NULL GREEN
3 ABC NULL PINK
4 DEFG NULL SILVER
5 DEFG NULL GOLD
...

Yeah I am not worried about the stock_level, just need a null value into the new table, as the stock would have to be recounted.

I just keep getting stuck on how to do this. Maybe I've been looking at too many different ways and the answer is straight in front of me. If you have any suggestions I would be grateful.

Many thanks

Kev
QuestionHow to get RelationShip Between SQL Functions? Pin
pubududilena11-Nov-05 1:56
pubududilena11-Nov-05 1:56 
AnswerRe: How to get RelationShip Between SQL Functions? Pin
Colin Angus Mackay11-Nov-05 4:37
Colin Angus Mackay11-Nov-05 4:37 
Questionupdate in the same table Pin
Goodway10-Nov-05 20:18
Goodway10-Nov-05 20:18 
AnswerRe: update in the same table Pin
softty11-Nov-05 8:54
softty11-Nov-05 8:54 
GeneralRe: update in the same table Pin
anandss11-Nov-05 12:55
anandss11-Nov-05 12:55 
GeneralRe: update in the same table Pin
Goodway14-Nov-05 20:48
Goodway14-Nov-05 20:48 
QuestionInvalidated ADO Connection Object Pin
alex120510-Nov-05 19:31
alex120510-Nov-05 19:31 
AnswerRe: Invalidated ADO Connection Object Pin
S Douglas13-Nov-05 22:02
professionalS Douglas13-Nov-05 22:02 
GeneralRe: Invalidated ADO Connection Object Pin
alex120514-Nov-05 0:18
alex120514-Nov-05 0:18 
GeneralRe: Invalidated ADO Connection Object Pin
S Douglas14-Nov-05 0:46
professionalS Douglas14-Nov-05 0:46 
Questionsql problem Pin
ppp00110-Nov-05 18:33
ppp00110-Nov-05 18:33 
AnswerRe: sql problem Pin
Colin Angus Mackay11-Nov-05 0:11
Colin Angus Mackay11-Nov-05 0:11 
QuestionASP.net (c#) and SQL server Pin
Sasuko10-Nov-05 6:19
Sasuko10-Nov-05 6:19 
AnswerRe: ASP.net (c#) and SQL server Pin
Colin Angus Mackay10-Nov-05 13:50
Colin Angus Mackay10-Nov-05 13:50 
QuestionHELP...SQL Server DTS Package probs... Pin
murrayb302410-Nov-05 6:02
murrayb302410-Nov-05 6:02 
AnswerUpdate Pin
murrayb302410-Nov-05 6:42
murrayb302410-Nov-05 6:42 
QuestionHELP!!!!!!!- How to decompile .DLL file to get source code back??? Pin
vicky4579-Nov-05 14:27
vicky4579-Nov-05 14:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.