Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««1112131415»»

wildcards Expand / Collapse
Author
Message
Posted Wednesday, September 11, 2013 9:17 PM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Friday, August 22, 2014 8:50 AM
Points: 4,425, Visits: 3,417
Primo Dang (9/11/2013)
L' Eomot Inversé (9/11/2013)
Revenant (9/11/2013)
L' Eomot Inversé (9/11/2013)
Primo Dang (9/11/2013)
L' Eomot Inversé (9/11/2013)
isaquedejair (9/11/2013)

Discordo do resultado ser "2", pelo fato de que no momento de gerar o insert ocorre um erro
"String or binary data would be truncated.", o ultimo nome 'Steppenwolf' excede 10 caracteres

É galego ou é portugués?


Nenhum dos dois, é português. ;]

Ai. Obrigado por responder. Eu não know o português nada e meu galego é bem terrível, and so eu não pudesse contar seu português de galego. Era muito fácil entender, entretanto - eu desejo que eu pudesse escrever ingles so well que se entendeu por um não-orador de inglês.

I have been told there are only two languages - English and profanity. I understand you are not speaking English.

I can't detect any profanity - so I guess primo Dang and I must have been writing English. . I though we were writing in Galician and in Portuguese, but ...
However, my Galician (almost non-existent) is probably pretty hard for him to understand, even though I have tried to switch to Portuguese orthography and may have succeeded for about as many words as I stuck to English for. And his Portuguese is a pretty hard for me because I've never learnt any Portuguese at all. WTF does "Nenhum" mean, for example? I've never heard it in Galician. (Just to avoid confusion, about a millennium ago Gallego was the language of the west and much of the north of Iberia; two modern languages have descended from it; Galician (which has kept the name) and Portuguese. Portuguese changed the name of the language because it wanted to make clear a distinction from any language spoken in Spain; in effect Galician is the language descended from medieval Gallego amongst the people who accepted rule by Central and North Eastern Spain.; Portuguese is the language descended from medieval Gallego amongst people who rejected subordination to Central and North Eastern Spain (and formed a separate country, Portugal).


I had no idea about the history of the Portuguese language, thanks for that. =]

Anyway, "nenhum" means "none" (although in the particular context where I employed it, it would be better translated to "neither", as is "neither of the two").

My hat tip to anyone who is able to meaningfully participate in this conversation. I am fluent in only six languages and I can read about three more, but I am out of my depth on this one.

(Icon for a hat tip sorely missing. Steve?)
Post #1493982
Posted Thursday, September 12, 2013 6:27 AM
SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Friday, August 22, 2014 8:27 AM
Points: 4,011, Visits: 715
I know - the super-secret option Ignore Truncation was set


Post #1494131
Posted Thursday, September 12, 2013 8:11 AM


Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, July 8, 2014 8:17 AM
Points: 11, Visits: 59
I don't care what the right answer is, but it's nice to know what the [^p] does in the statement.
Post #1494196
Posted Thursday, September 12, 2013 10:34 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Monday, August 4, 2014 12:29 PM
Points: 1,812, Visits: 584
Hugo Kornelis (9/11/2013)
[quote]Hany Helmy (9/11/2013)
I am really amazed of the 16 people (as of now) who got it right!

And to all people who think they need to post to "get their point back" - rubbish! Points are never subtracted for giving an incorrect reply. You didn't lose anything.
(And even if you post a million posts, you still don't get extra points for the "Question of the Day" category).

I am still waiting for the day Steve finally comes to his senses and gets rid of the points system. (Though the idea to subtract points for posting useless rubbish does have a nice ring to it).


Totally agree with you..
Post #1494283
Posted Thursday, September 12, 2013 11:52 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 1:14 PM
Points: 5,977, Visits: 8,237
L' Eomot Inversé (9/11/2013)
Hugo Kornelis (9/11/2013)
Hany Helmy (9/11/2013)
I am really amazed of the 16 people (as of now) who got it right!

Hope one of them will post a reply explaining how he got the result without throwing an error.


Very easy. Just answer the question the way it is intended: by looking at the code and not copy/paste-ing it.
I saw the subject of the question, saw the question, and concentrated on the wildcards in the LIKE. I never checked the data types of the table.

(Yes, I only answered after the question was already corrected. But that was irrelevant to me - I had completely not looked at the data types anyway).

Come on Hugo, that's just pain silly, why would anyone have looked at the lengths of the data when the type was varchar(50).


It would be silly if I had actually written that. I haven't. What I wrote, multiple times in a (for me) short message, is that I had not looked at the data type.



Hugo Kornelis, SQL Server MVP
Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
Post #1494304
Posted Thursday, September 12, 2013 6:47 PM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Today @ 4:07 PM
Points: 8,723, Visits: 9,274
Hugo Kornelis (9/12/2013)[h]
It would be silly if I had actually written that. I haven't. What I wrote, multiple times in a (for me) short message, is that I had not looked at the data type.

Arrgh, sloppy reading by me .
I guess that when you said you looked at the code I thought that the data declarations were part of the code and so subconsciously decided to misread the next bit because if I didn't I would be reading a contradiction.


Tom
Post #1494412
Posted Friday, September 13, 2013 1:01 AM


Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, July 8, 2014 8:17 AM
Points: 11, Visits: 59
Moderator, please end this topic...
Post #1494472
Posted Monday, September 16, 2013 7:09 AM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Friday, August 8, 2014 12:59 PM
Points: 310, Visits: 74
Yeah, my initial thought was "2, if my instance of 2008R2 properly handles regex, we'll see..." So I ran the code and got the error:

Msg 102, Level 15, State 1, Line 3
Incorrect syntax near ','.

So I ended up choosing 0, assuming that was the stand-in for an error message. I'unno, maybe it works properly on 2012?

Not saying I deserve a point or anything, I certainly was wrong. I guess I'm just asking: If it's not specified in the question, are we meant to always assume the newest version of SQL Server?
Post #1495060
Posted Monday, September 16, 2013 9:41 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Today @ 3:27 PM
Points: 33,202, Visits: 15,347
Drew Copenhaver (9/16/2013)
Yeah, my initial thought was "2, if my instance of 2008R2 properly handles regex, we'll see..." So I ran the code and got the error:

Msg 102, Level 15, State 1, Line 3
Incorrect syntax near ','.

So I ended up choosing 0, assuming that was the stand-in for an error message. I'unno, maybe it works properly on 2012?

Not saying I deserve a point or anything, I certainly was wrong. I guess I'm just asking: If it's not specified in the question, are we meant to always assume the newest version of SQL Server?


I'm not sure that's true. I ran this on my R2 instance and it worked. The regex stuff in LIKE should have been there far earlier. I don't have a SS2K or SS2K5 instance handy, but I think it worked then.

Your error is a syntax error, which might be a transcription or cut/paste error.







Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #1495159
Posted Monday, September 16, 2013 10:12 AM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Friday, August 8, 2014 12:59 PM
Points: 310, Visits: 74
Steve Jones - SSC Editor (9/16/2013)
Drew Copenhaver (9/16/2013)
Yeah, my initial thought was "2, if my instance of 2008R2 properly handles regex, we'll see..." So I ran the code and got the error:

Msg 102, Level 15, State 1, Line 3
Incorrect syntax near ','.

So I ended up choosing 0, assuming that was the stand-in for an error message. I'unno, maybe it works properly on 2012?

Not saying I deserve a point or anything, I certainly was wrong. I guess I'm just asking: If it's not specified in the question, are we meant to always assume the newest version of SQL Server?


I'm not sure that's true. I ran this on my R2 instance and it worked. The regex stuff in LIKE should have been there far earlier. I don't have a SS2K or SS2K5 instance handy, but I think it worked then.

Your error is a syntax error, which might be a transcription or cut/paste error.


My mistake. I don't think it's a syntax or copy past error, though. We've got two servers running different instances of SQL here. I played with the syntax and couldn't get it to work on what I believe is the 2008 box, but it did work on our other server which is running 2005 and it ran with the correct results. I'm stumped. Might just ask our DBA later and see what he thinks.
Post #1495175
« Prev Topic | Next Topic »

Add to briefcase «««1112131415»»

Permissions Expand / Collapse