hcl-bot
October 28, 2008, 12:18pm
1
I am trying to pull data from our sql server and what I want from my result set is to get the first 10 characters of column 179. So far I have the code below. How can I update that to only pull the first 10 characters? Thanks in advance!
doc.ExpDate = res.GetValue(179)
Subject: RE: Select statement and 10 characters to Left
Please read about Left function.
Subject: RE: Select statement and 10 characters to Left
Thank you, I did read that before posting and also searched for sample code. This isn’t working for me.
Subject: RE: Select statement and 10 characters to Left
What type of field are you trying to place the data into? Also you mention it did not work - what exactly happended?
Subject: RE: Select statement and 10 characters to Left
you tried this?
doc.ExpDate = Left(res.GetValue(179), 10)
getting an error? what?
Subject: RE: Select statement and 10 characters to Left
Thank you, Paul. That worked!