Hello
I'm sending an INSERT that looks something like this, today
@%1-3 are variables that's replaced by our system. So far so good.
Here's the tricky part. A new requirement is to send a part of the JobNo (@%2), to another field as well, that we might call LineNo. For example, our system sends '12345.01' as variable @%2, and I want the '12345' part of it to go into JobNo and the '01' to go into LineNo. Does that make any sense? I haven't touched SQL before so I'm a bit lost. I've googled and some kind of string split function exists but I'm not sure on how to apply it here, if it's even possible. Mind you, I'm just trying the easy way here, if this doesn't work we'll go the long way around and make sure we have two different inputs for JobNo and LineNo.
I'm sending an INSERT that looks something like this, today
Code:
INSERT INTO table_name (ID, JobNo, Volume) VALUES (@'%1', '@%2', '@%3')
Here's the tricky part. A new requirement is to send a part of the JobNo (@%2), to another field as well, that we might call LineNo. For example, our system sends '12345.01' as variable @%2, and I want the '12345' part of it to go into JobNo and the '01' to go into LineNo. Does that make any sense? I haven't touched SQL before so I'm a bit lost. I've googled and some kind of string split function exists but I'm not sure on how to apply it here, if it's even possible. Mind you, I'm just trying the easy way here, if this doesn't work we'll go the long way around and make sure we have two different inputs for JobNo and LineNo.