Results 1 to 10 of 10

Thread: CHARINDEX not working

  1. #1
    Join Date
    Apr 2013
    Posts
    6

    CHARINDEX not working

    charindex help.jpg

    Anyone able to tell me why CHARINDEX(':',MVSLIB,35) is not working?

  2. #2
    Join Date
    Sep 2002
    Posts
    5,938
    What do you mean 'not working'? Did you get any error?

  3. #3
    Join Date
    Apr 2013
    Posts
    6
    Quote Originally Posted by rmiao View Post
    What do you mean 'not working'? Did you get any error?
    Yes, the error message is in the screenshot showing the statement and the error?

  4. #4
    Join Date
    Sep 2002
    Posts
    5,938
    Didn't see query there. Did you try with t-sql in query window and post query/error?

  5. #5
    Join Date
    Apr 2013
    Posts
    6
    Quote Originally Posted by rmiao View Post
    Didn't see query there. Did you try with t-sql in query window and post query/error?
    Sorry I'm new to SQL talk. I usually get the I.T guys to create me the report in Crystal Reports and exract me the SQL statement to use in Excel Microsoft Query.

    What exactly do you mean by t-sql in query window?

  6. #6
    Join Date
    Sep 2002
    Posts
    5,938
    Did you run query against sql table? Is it sql server related issue?

  7. #7
    Join Date
    Apr 2013
    Posts
    6
    Quote Originally Posted by rmiao View Post
    Did you run query against sql table? Is it sql server related issue?
    I do this:

    Microsoft Excel
    Data
    From Other Sources
    From Microsoft Query
    Choose the database
    Login
    Choose the tables & columns
    Output it to a table in Excel

    Than I edit it via the query editor or direct edit the command SQL statement

  8. #8
    Join Date
    Sep 2002
    Posts
    5,938
    This is sql server forum, you should post the issue in excel forum.

  9. #9
    Join Date
    Apr 2013
    Posts
    6
    Quote Originally Posted by rmiao View Post
    This is sql server forum, you should post the issue in excel forum.
    So you can't see any problem with the SQL statement?

    I'm just using Excel to output to a table the data retrieved by the SQL statement, so it's not really an Excel issue? It's SQL language?

  10. #10
    Join Date
    Sep 2002
    Posts
    5,938
    It doesn't sound sql issue, should post it to excel forum.

Posting Permissions

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