Let's say I have data like that in MyTable:
PIN PID ... ... 11-07-934-010 4086 11-07-934-010-01 4152 11-07-934-010-02 4153 11-07-934-010-03 4154 11-07-934-010-04 4155 11-07-934-010-05 4156 ... ...If I only have one PID available (let's say 4152), how can I get the rest of the PIDs in one easy request?
I know I can do this:
WHERE PIN LIKE '11-07-934-010%'
but I don't have 11-07-934-010% available.
I can get 11-07-934-010 by:
SELECT SUBSTR(PIN, 1, 13) AS MYPIN
WHERE PID = 4152
But then I cannot combine the 2 requests:
WHERE PIN LIKE '(SELECT SUBSTR(PIN, 1, 13)
WHERE PID = 4152)%'
A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station.