Democratic Underground Latest Greatest Lobby Journals Search Options Help Login
Google

Any SQL experts here - HELP!!

Printer-friendly format Printer-friendly format
Printer-friendly format Email this thread to a friend
Printer-friendly format Bookmark this thread
This topic is archived.
Home » Discuss » The DU Lounge Donate to DU
 
LynneSin Donating Member (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
Printer Friendly | Permalink |  | Top
DS1 Donating Member (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)
Printer Friendly | Permalink |  | Top
 
LynneSin Donating Member (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
Printer Friendly | Permalink |  | Top
 
demnan Donating Member (1000+ posts) Send PM | Profile | Ignore Mon Aug-29-05 02:00 PM
Response to Original message
2. Something like this
Select from table where substr(29) = 'R'
Printer Friendly | Permalink |  | Top
 
tridim Donating Member (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
Printer Friendly | Permalink |  | Top
 
DU AdBot (1000+ posts) Click to send private message to this author Click to view 
this author's profile Click to add 
this author to your buddy list Click to add 
this author to your Ignore list Thu Dec 26th 2024, 09:03 AM
Response to Original message
Advertisements [?]
 Top

Home » Discuss » The DU Lounge Donate to DU

Powered by DCForum+ Version 1.1 Copyright 1997-2002 DCScripts.com
Software has been extensively modified by the DU administrators


Important Notices: By participating on this discussion board, visitors agree to abide by the rules outlined on our Rules page. Messages posted on the Democratic Underground Discussion Forums are the opinions of the individuals who post them, and do not necessarily represent the opinions of Democratic Underground, LLC.

Home  |  Discussion Forums  |  Journals |  Store  |  Donate

About DU  |  Contact Us  |  Privacy Policy

Got a message for Democratic Underground? Click here to send us a message.

© 2001 - 2011 Democratic Underground, LLC