Calling SQL kurror Chalanachithram.com | Topics | Search
Hide Clipart | Log Out | Register | Edit Profile

Last 30 mins | 1 | 2 | 4 hours     Last 1 | 7 Days

Chalanachithram.com DB » New TF Industry Related » Archive through April 07, 2014 » Calling SQL kurror « Previous Next »

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

Dreamcatcher
Side Hero
Username: Dreamcatcher

Post Number: 5613
Registered: 11-2009
Posted From: 208.86.145.68

Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, April 07, 2014 - 03:41 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

sql server aithay, idi try maadi...

http://stackoverflow.com/questions/11794487/sql-server-how-t o-find-hexadecimal-character-in-a-table
Top of pagePrevious messageNext messageBottom of page Link to this message

Dreamcatcher
Side Hero
Username: Dreamcatcher

Post Number: 5612
Registered: 11-2009
Posted From: 208.86.145.68

Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, April 07, 2014 - 03:38 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Maverick:

0x1 is hex value..




that is why I gave a query that searched for that hex value...looks like that did not work.
Top of pagePrevious messageNext messageBottom of page Link to this message

Maverick
Legend
Username: Maverick

Post Number: 49413
Registered: 01-2008
Posted From: 70.39.176.60

Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, April 07, 2014 - 03:35 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

0x1 is hex value..why are u guys searching for x in regular strings? i dont get it
Top of pagePrevious messageNext messageBottom of page Link to this message

Maharshi
Side Hero
Username: Maharshi

Post Number: 3392
Registered: 02-2008
Posted From: 170.146.220.23

Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, April 07, 2014 - 03:35 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

see if this works :

SELECT * FROM Table_Name WHERE CHARINDEX(' ',Column_Name) > 0
Top of pagePrevious messageNext messageBottom of page Link to this message

Twitter
Legend
Username: Twitter

Post Number: 33535
Registered: 10-2009
Posted From: 69.118.124.210

Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, April 07, 2014 - 03:34 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Humpty_dumpty:

function overloading aa...rtrim kee 2 args eti




yes rtrim can be overloaded it takes leading char (leading char can be anything or just space)
Top of pagePrevious messageNext messageBottom of page Link to this message

Humpty_dumpty
Moderator
Username: Humpty_dumpty

Post Number: 25762
Registered: 02-2009

Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, April 07, 2014 - 03:33 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Twitter:

RTRIM(col_id, 'x')


function overloading aa...rtrim kee 2 args eti
Top of pagePrevious messageNext messageBottom of page Link to this message

Dreamcatcher
Side Hero
Username: Dreamcatcher

Post Number: 5610
Registered: 11-2009
Posted From: 208.86.145.68

Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, April 07, 2014 - 03:32 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Humpty_dumpty:

no result




May be this will be of help...

http://stackoverflow.com/questions/9710185/how-to-deal-with- invalid-characters-in-a-ws-output-when-using-cxf
Top of pagePrevious messageNext messageBottom of page Link to this message

Twitter
Legend
Username: Twitter

Post Number: 33533
Registered: 10-2009
Posted From: 69.118.124.210

Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, April 07, 2014 - 03:26 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Humpty_dumpty:

I want to know which row is messed up so that user can correct it from UI without doing a code update




select * from table where RTRIM(col_id, 'x') IN (select col_id from table)

idhi try chei sub qry will return all ..outer qry will actually uses rtrim fn to search 'x' or ' ' ..
Top of pagePrevious messageNext messageBottom of page Link to this message

Humpty_dumpty
Moderator
Username: Humpty_dumpty

Post Number: 25761
Registered: 02-2009

Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, April 07, 2014 - 03:26 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Maverick:

its lot easier in java with whole set of string functions


i know
the next option is to write a unit test to connect to prod db to fidn the bad row, which i dont want to do
Top of pagePrevious messageNext messageBottom of page Link to this message

Maverick
Legend
Username: Maverick

Post Number: 49412
Registered: 01-2008
Posted From: 70.39.176.60

Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, April 07, 2014 - 03:23 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Humpty_dumpty:

it does a basic trim(). that does not catch white space coming somewhere in the text.


i think you should do more than that..and its lot easier in java with whole set of string functions..replace/replaceall should work
Top of pagePrevious messageNext messageBottom of page Link to this message

Kaisersooze
Moderator
Username: Kaisersooze

Post Number: 10294
Registered: 04-2009

Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, April 07, 2014 - 03:22 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Humpty_dumpty:




sqlserver synatx theliyadhu bro..nenu ichindhi Oracle.good for reg expression sql server...syntax chusi kottei
Top of pagePrevious messageNext messageBottom of page Link to this message

Humpty_dumpty
Moderator
Username: Humpty_dumpty

Post Number: 25760
Registered: 02-2009

Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, April 07, 2014 - 03:21 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Twitter:

first aa service raasinodni peekei


M dharmaraju MA cnmaa naa idhi emaina
Top of pagePrevious messageNext messageBottom of page Link to this message

Humpty_dumpty
Moderator
Username: Humpty_dumpty

Post Number: 25759
Registered: 02-2009

Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, April 07, 2014 - 03:20 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Maverick:

cant ur program handle it in java itself?


it does a basic trim(). that does not catch white space coming somewhere in the text.

i am not sure if anyone reading a text field codes for hex characters each time
Top of pagePrevious messageNext messageBottom of page Link to this message

Kaisersooze
Moderator
Username: Kaisersooze

Post Number: 10293
Registered: 04-2009

Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, April 07, 2014 - 03:18 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

select coulmn_name,regexp_substr(column_name,'[[:space:]]+[[:alnum: ]]+[[:space:]]+')
from table_name

string mundhu space and last lo space isthadhi...madhyalodhi any alpha numeric.if you have any other charcathers use [[:graph:]] after alpha
Top of pagePrevious messageNext messageBottom of page Link to this message

Twitter
Legend
Username: Twitter

Post Number: 33532
Registered: 10-2009
Posted From: 69.118.124.210

Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, April 07, 2014 - 03:18 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Humpty_dumpty:

axis engine fails during marshalling and spits out below error




first aa service raasinodni peekei .. result set lo white space kooda handle seyaledha useles fello
Top of pagePrevious messageNext messageBottom of page Link to this message

Humpty_dumpty
Moderator
Username: Humpty_dumpty

Post Number: 25758
Registered: 02-2009

Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, April 07, 2014 - 03:18 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Dreamcatcher:

select *
from table_a
where col_a like '%' + CHAR(0x1) +'%'


no result


Gotcha:

You can use REPLACE function to replace the characters while doing select if you don't want to change the value.


I want to know which row is messed up so that user can correct it from UI without doing a code update


Kaisersooze:

select coulmn_name,regexp_substr(column_name,'[[:space:]]+')
from table_name


sql server equivalent?
Top of pagePrevious messageNext messageBottom of page Link to this message

Maverick
Legend
Username: Maverick

Post Number: 49411
Registered: 01-2008
Posted From: 70.39.176.60

Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, April 07, 2014 - 03:18 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

cant ur program handle it in java itself?
Top of pagePrevious messageNext messageBottom of page Link to this message

Maharshi
Side Hero
Username: Maharshi

Post Number: 3390
Registered: 02-2008
Posted From: 170.146.221.26

Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, April 07, 2014 - 03:12 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

To remove space:

select Column_Name, replace(Column_Name,' ','') as New_Column
from Table_Name

Finding white space position ante charindex function use chesi cheyachu
Top of pagePrevious messageNext messageBottom of page Link to this message

Kaisersooze
Moderator
Username: Kaisersooze

Post Number: 10292
Registered: 04-2009

Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, April 07, 2014 - 03:11 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

select coulmn_name,regexp_substr(column_name,'[[:space:]]+')
from table_name
Top of pagePrevious messageNext messageBottom of page Link to this message

Buduguuu
Hero
Username: Buduguuu

Post Number: 18062
Registered: 01-2012
Posted From: 199.67.138.49

Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, April 07, 2014 - 03:08 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

copy paste errors lo spaces eppudu leading or trailing untai most of the times. use trim function to remove unwanted spaces or characters at the begininning or end

data huge aite query time teesukuntadi mari..
Pride of TFI, Nenokkadine - New_User,70 years TFI history lo ee cinema ki Sukumar padda kastam, inka ye director padi undadu. Commercial success ayyunte bavundedi
Top of pagePrevious messageNext messageBottom of page Link to this message

Kaisersooze
Moderator
Username: Kaisersooze

Post Number: 10291
Registered: 04-2009

Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, April 07, 2014 - 03:07 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Humpty_dumpty:




do u know the column_name?
Top of pagePrevious messageNext messageBottom of page Link to this message

Gotcha
Hero
Username: Gotcha

Post Number: 14903
Registered: 02-2008
Posted From: 8.19.193.14

Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, April 07, 2014 - 03:05 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

You can use REPLACE function to replace the characters while doing select if you don't want to change the value.
This Andhra real estate is for sale.
Top of pagePrevious messageNext messageBottom of page Link to this message

Dreamcatcher
Side Hero
Username: Dreamcatcher

Post Number: 5609
Registered: 11-2009
Posted From: 208.86.145.68

Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, April 07, 2014 - 03:03 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

assuming you know which column it is failing on...
Top of pagePrevious messageNext messageBottom of page Link to this message

Dreamcatcher
Side Hero
Username: Dreamcatcher

Post Number: 5608
Registered: 11-2009
Posted From: 208.86.145.68

Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, April 07, 2014 - 03:02 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

try this...

select *
from table_a
where col_a like '%' + CHAR(0x1) +'%'
Top of pagePrevious messageNext messageBottom of page Link to this message

Humpty_dumpty
Moderator
Username: Humpty_dumpty

Post Number: 25757
Registered: 02-2009

Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, April 07, 2014 - 02:59 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

One of my table columns has some invalid whitespace character
as a result, axis engine fails during marshalling and spits out below error

org.apache.axis2.AxisFault: Invalid white space character (0x1) in text to output
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430) [axis2-kernel-1.5.1.jar]
at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo (SOAPMessageFormatter.java:83) [axis2-kernel-1.5.1.jar]
at org.apache.axis2.transport.http.AxisRequestEntity.writeReque st(AxisRequestEntity.java:84) [axis2-transport-http-1.5.1.jar]
at org.apache.commons.httpclient.methods.EntityEnclosingMethod. writeRequestBody(EntityEnclosingMethod.java:499) [commons-httpclient-3.1.jar]



Q: How do I find such characters using SQL query?
THis probably happened due to user copy pasta from some other place

Add Your Message Here
Post:
Bold text Italics Underline Create a hyperlink Insert a clipart image HASH(0x85f23ac){Movie Clipart}
Show / hide regular icons selection options

Click on following links to open cliparts by Alphabetical Order

 A   B   C   D   E   F   G   H   I   J   K   L   M  

 N   O   P   Q   R   S   T   U   V   W   X   Y   Z  

Show / Hide Filmy icons selection options

Click on following links to open cliparts by Alphabetical Order

 A   B   C   D   E   F   G   H   I   J   K   L   M  

 N   O   P   Q   R   S   T   U   V   W   X   Y   Z  

Username: Posting Information:
This is a public posting area. Enter your username and password if you have an account. Otherwise, enter your full name as your username and leave the password blank. Your e-mail address is optional.
Password:
E-mail:
Options: Enable HTML code in message
Automatically activate URLs in message
Action: