How to use split function i query

radek225

Registered User.
Local time
Today, 15:10
Joined
Apr 4, 2013
Messages
307
I have a query
Code:
SELECT tblZlecenia.ID_Zlecenia, tblZlecenia.TerminOdbioru, tblOffset.ID_RodzajZlecenia, tblZlecenia.NazwaZlecenia, tblZlecenia.Id_K, tblZlecenia.Id_Rodzaj_Pracy
FROM tblZlecenia LEFT JOIN tblOffset ON tblZlecenia.ID_Zlecenia = tblOffset.ID_Zlecenia
[COLOR="Red"]where [/COLOR]

In where I would like to put code like this:
Code:
Split(tblOffset.DziedziczonePo, ";")(1) & ";" & Split(tblOffset.DziedziczonePo, ";"(2) & ";" = "tak;tak"

Is it possible to create such a query?
 
That's not giving to work. A SELECT query is just going to return records, not values.

You'll have more success having a function in a module which receives the field and a position, then returns the value from the Split (done in the function).

That you have to split data out in this way also suggests your method of storing data in this field is suspect and likely violates a fundamental principle of database design: namely not storing multiple items of data in a single field/row.
 

Users who are viewing this thread

Back
Top Bottom