Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. sql query problem

sql query problem

Scheduled Pinned Locked Moved ASP.NET
databasecsharpsql-serversysadminhelp
8 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    Unknown Ajanabi
    wrote on last edited by
    #1

    hi, when i am running this query from sql server query analyzer it won't return a single record from table.while table has number of records matching this field. select * from csvdata where [source]='529042010\All Data 4cr\0.66cr_calicut_1401 ' plz suggest me solution. thanks in advance.

    no knowledge in .net

    J G S S 4 Replies Last reply
    0
    • U Unknown Ajanabi

      hi, when i am running this query from sql server query analyzer it won't return a single record from table.while table has number of records matching this field. select * from csvdata where [source]='529042010\All Data 4cr\0.66cr_calicut_1401 ' plz suggest me solution. thanks in advance.

      no knowledge in .net

      J Offline
      J Offline
      JHizzle
      wrote on last edited by
      #2

      Well is there a record that matches that value for that field? You'd also have been better off posting here http://www.codeproject.com/Forums/1725/General-Database.aspx[^]

      U 1 Reply Last reply
      0
      • J JHizzle

        Well is there a record that matches that value for that field? You'd also have been better off posting here http://www.codeproject.com/Forums/1725/General-Database.aspx[^]

        U Offline
        U Offline
        Unknown Ajanabi
        wrote on last edited by
        #3

        hi, yes JHizzle table has more than one thousand records matching to the value. and i don't want to use like keyword

        no knowledge in .net

        J 1 Reply Last reply
        0
        • U Unknown Ajanabi

          hi, yes JHizzle table has more than one thousand records matching to the value. and i don't want to use like keyword

          no knowledge in .net

          J Offline
          J Offline
          JHizzle
          wrote on last edited by
          #4

          Touch tricky to nail ti down without being able to see it I'm afraid but;I've just noticed one thing that's a bit odd about your query. There's a space at the right hand side of your search string. What happens when that's removed?

          U 1 Reply Last reply
          0
          • J JHizzle

            Touch tricky to nail ti down without being able to see it I'm afraid but;I've just noticed one thing that's a bit odd about your query. There's a space at the right hand side of your search string. What happens when that's removed?

            U Offline
            U Offline
            Unknown Ajanabi
            wrote on last edited by
            #5

            still no results, on removing space from the the value. does backslash affect my query or the starting number that is prefix in my query?

            no knowledge in .net

            1 Reply Last reply
            0
            • U Unknown Ajanabi

              hi, when i am running this query from sql server query analyzer it won't return a single record from table.while table has number of records matching this field. select * from csvdata where [source]='529042010\All Data 4cr\0.66cr_calicut_1401 ' plz suggest me solution. thanks in advance.

              no knowledge in .net

              G Offline
              G Offline
              Gaurav Dudeja India
              wrote on last edited by
              #6

              there is one space in end of this '529042010\All Data 4cr\0.66cr_calicut_1401 ' remove space i.e. you use '529042010\All Data 4cr\0.66cr_calicut_1401'

              Gaurav Dudeja http://www.gdinfotechindia.com
              Dont be afraid of changing your life to better !

              1 Reply Last reply
              0
              • U Unknown Ajanabi

                hi, when i am running this query from sql server query analyzer it won't return a single record from table.while table has number of records matching this field. select * from csvdata where [source]='529042010\All Data 4cr\0.66cr_calicut_1401 ' plz suggest me solution. thanks in advance.

                no knowledge in .net

                S Offline
                S Offline
                saini arun
                wrote on last edited by
                #7

                In case you are not getting any matching rows even after removing the extra space from the end of the string, and you are sure that there are matching values in the table, there must be a small catch somewhere which you/we are not able to understand. Few questions: 1. Are you getting matching rows with LIKE clause? select * from csvdata where [source] LIKE '529042010\All Data 4cr\0.66cr_calicut_1401%' 2. What is the datatype of the target column? 3. Can you please paste some values directly from csvdata table which, you think, should match with the condition?

                1 Reply Last reply
                0
                • U Unknown Ajanabi

                  hi, when i am running this query from sql server query analyzer it won't return a single record from table.while table has number of records matching this field. select * from csvdata where [source]='529042010\All Data 4cr\0.66cr_calicut_1401 ' plz suggest me solution. thanks in advance.

                  no knowledge in .net

                  S Offline
                  S Offline
                  Sandesh M Patil
                  wrote on last edited by
                  #8

                  Write this Question in General database forum........... :)

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups