LynneSin
(1000+ posts)
Send PM |
Profile |
Ignore
|
Mon Aug-29-05 01:56 PM
Original message |
Any SQL experts here - HELP!! |
|
I have a field where I want to return all the charcaters after the 28th character. In a nutshell all the data returned for the field will start with the same exact 28 characters and only after character 29 will the unique data start.
I'm really just new with SQL and I mostly work with UNIX experts. IS there a way to write the statement so only characters starting at #29 and onward are displayed?
Thanks
|
DS1
(1000+ posts)
Send PM |
Profile |
Ignore
|
Mon Aug-29-05 02:00 PM
Response to Original message |
1. without knowing what engine you're using |
|
SELECT SUBSTRING('col_name', 28)
|
LynneSin
(1000+ posts)
Send PM |
Profile |
Ignore
|
Mon Aug-29-05 02:02 PM
Response to Reply #1 |
4. Sorry - SQL Navigator/MS Query |
|
SQL Navigator makes it easier to build but utlimately it'll be run in MSQuery since I can build that into my EXCEL spreadsheet.
Thanks
|
demnan
(1000+ posts)
Send PM |
Profile |
Ignore
|
Mon Aug-29-05 02:00 PM
Response to Original message |
|
Select from table where substr(29) = 'R'
|
tridim
(1000+ posts)
Send PM |
Profile |
Ignore
|
Mon Aug-29-05 02:02 PM
Response to Original message |
3. I'd take the entire result and parse it after the fact |
|
Edited on Mon Aug-29-05 02:03 PM by tridim
with normal string manipulation. You should look at 'substring' in sql, that'll probably do it too. http://www.redhat.com/docs/manuals/database/RHDB-7.1.3-Manual/sql/functions-string.html
|
DU
AdBot (1000+ posts) |
Thu Apr 25th 2024, 06:31 AM
Response to Original message |