Professional Web Applications Themes

HELP WITH STATEMENT?? - ASP Database

I have a problem, which I do not know if it can be done: I have a SQL statement, which has: (USER.first_name = UND.processor) OK, the problem is that the fieled 'processor' looks like: lastname, firstname I need to break out the just firstname in my sql statement. Please help???? Thanks!!...

  1. #1

    Default HELP WITH STATEMENT??

    I have a problem, which I do not know if it can be done:

    I have a SQL statement, which has:
    (USER.first_name = UND.processor)

    OK, the problem is that the fieled 'processor' looks like:
    lastname, firstname I need to break out the just firstname
    in my sql statement.

    Please help????

    Thanks!!
    aaron Guest

  2. #2

    Default Re: HELP WITH STATEMENT??

    What kind of database?
    Why are you storing multiple pieces of data in one column?

    Ray at work

    "aaron" <abroadwayameritrust.com> wrote in message
    news:00c601c38129$76bdd360$a401280aphx.gbl...
    > I have a problem, which I do not know if it can be done:
    >
    > I have a SQL statement, which has:
    > (USER.first_name = UND.processor)
    >
    > OK, the problem is that the fieled 'processor' looks like:
    > lastname, firstname I need to break out the just firstname
    > in my sql statement.
    >
    > Please help????
    >
    > Thanks!!

    Ray at Guest

  3. #3

    Default Re: HELP WITH STATEMENT??

    "aaron" <abroadwayameritrust.com> wrote in message
    news:00c601c38129$76bdd360$a401280aphx.gbl...
    > I have a problem, which I do not know if it can be done:
    >
    > I have a SQL statement, which has:
    > (USER.first_name = UND.processor)
    >
    > OK, the problem is that the fieled 'processor' looks like:
    > lastname, firstname I need to break out the just firstname
    > in my sql statement.
    >
    > Please help????
    >
    > Thanks!!
    Database? Version? Table Structure?


    Chris Hohmann Guest

  4. #4

    Default Re: HELP WITH STATEMENT??

    I don't know anything about Foxpro, so I don't know if these functions
    exist, but here is how I would do it in SQL Server (until someone told me
    what I was doing wrong and I changed it).


    SELECT USER.Whatever,UND.Whatever FROM
    USER INNER JOIN UND ON
    USER.first_name=RIGHT(UND.processor, LEN(UND.processor) -
    CHARINDEX(',', UND.processor) - 1)

    I think that's what I mean.

    Ray at work




    select table1.*, table3.* from
    table1 inner join table3 on
    table1.Thename = right(table3.Thename, len(table3.thename)- charindex(',',
    table3.Thename)-1)

    "aaron" <abroadwayameritrust.com> wrote in message
    news:0e7a01c38131$a32d4720$a001280aphx.gbl...
    > Hello, thanks for the reply!
    >
    > I am using FOXPRO, and I was not the one who designed the
    > information flow. I know it is bad design, but I have to
    > use it anyway. I am just pulling data out?
    >
    > THanks,
    > >-----Original Message-----
    > >What kind of database?
    > >Why are you storing multiple pieces of data in one column?
    > >
    > >Ray at work
    > >
    > >"aaron" <abroadwayameritrust.com> wrote in message
    > >news:00c601c38129$76bdd360$a401280aphx.gbl...
    > >> I have a problem, which I do not know if it can be done:
    > >>
    > >> I have a SQL statement, which has:
    > >> (USER.first_name = UND.processor)
    > >>
    > >> OK, the problem is that the fieled 'processor' looks
    > like:
    > >> lastname, firstname I need to break out the just
    > firstname
    > >> in my sql statement.
    > >>
    > >> Please help????
    > >>
    > >> Thanks!!
    > >
    > >
    > >.
    > >

    Ray at Guest

Similar Threads

  1. help on SQL statement
    By filippo2991@virgilio.it in forum MySQL
    Replies: 2
    Last Post: June 9th, 01:13 PM
  2. [PHP] SQL statement
    By Chris W. Parker in forum PHP Development
    Replies: 14
    Last Post: September 28th, 03:48 PM
  3. if statement with url
    By John in forum PHP Development
    Replies: 5
    Last Post: September 11th, 03:13 AM
  4. if statement
    By alexz in forum ASP
    Replies: 8
    Last Post: July 15th, 04:57 PM
  5. Can i say OR in an if/then statement
    By crispy in forum ASP
    Replies: 6
    Last Post: July 9th, 07:27 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139