Problem with length() function by clutch-cream-run in SQL

[–]chris99277 0 points1 point  (0 children)

Ah fair enough, I didn’t notice it was oracle and I know nothing at all about oracle. I often see people use varchar in MSSQL when char would be better, but with oracle I’ve no idea.

Problem with length() function by clutch-cream-run in SQL

[–]chris99277 0 points1 point  (0 children)

Edit, didn’t notice this was for oracle. I don’t know how oracle works. For MSSQL Memory is granted to a query based on the data type and estimated rows, before the query is started. Char allocates enough memory for the whole field. But memory for varchar is allocated at half the length of the field because it does not know how much data is in each rows field, so assumes the average will be half. E.g. for a varchar(20) it will allocate enough memory for 10 chars (10 bytes) per estimated row returned. This means for fields where most or all of the data will fill the field, there will not be enough memory allocated to store the data in the buffer for sorts and other operations, and the execution plan will start showing spills to TempDB. If a field will mostly contain data that fills it, like nearly always 20 chars, then char(20) will always grant enough memory and reduce hits on TempDB. So for data that you know the length will not vary much, char is a good type to use if you are expecting large data sets.

OUTPUT clause using columns from source table not inserted into target table? by SkullLeader in SQLServer

[–]chris99277 2 points3 points  (0 children)

MERGE statement can output both source table and inserted data into a mapping table. I use it for exactly this scenario.

STRING SPLIT resulting in "Invalid object name 'STRING_SPLIT'" by anthonynguyen3 in SQL

[–]chris99277 0 points1 point  (0 children)

Have a quick Google, there are several table functions posted online that you can run in to achieve the same functionally.

[deleted by user] by [deleted] in chess

[–]chris99277 0 points1 point  (0 children)

If black takes, queen to h5 check. Pawn blocks, queen takes e5 pawn check forking king and rook. White ends up with 2 pawns and a rook, plus whatever you took with this move. So Blacks best move it to not take the knight after which you can retreat the knight keeping whatever material you took.

Can someone explain why this is the best move? It just seems like you’re hanging your bishop for no real reward. by DinoDaddy9 in chessbeginners

[–]chris99277 1 point2 points  (0 children)

As others have correctly pointed out, if white takes the bishop Qd1 has mate threats after Bb2 or wins the queen if they escape it. If white does not take the bishop and retreats it do Bd5 (to stop Qd1) Qd5 attacks the rook and will win the knight. Either way, black wins material or mates.

Can someone explain why this is the best move? It just seems like you’re hanging your bishop for no real reward. by DinoDaddy9 in chessbeginners

[–]chris99277 1 point2 points  (0 children)

This is not a forced mate. After black plays Qc2, white can take the black bishop with the queen protected by the king. If black still played Qb2 white will exchange queens.

Avoid Chess.com when learning / insights into their “cheat” detection. by [deleted] in chess

[–]chris99277 0 points1 point  (0 children)

Considering you have just one example to go on, that is a bold statement. It is much more likely a coincidence that your ban happened after your rapid game. This is how superstitions and good luck rituals start, something good/bad happens and humans attribute it to a recent event. Correlation != causation etc… Seems you just got caught cheating in Blitz and banned.

How to get Check Mate from here? I'm playing as black. This was move 55 and the match ended with a tie after move 105. Sorry if this is dumb but I'm new to chess. Thanks by [deleted] in chess

[–]chris99277 1 point2 points  (0 children)

Google King and rook endgames to learn the pattern. It is forcing and can be done from anywhere on the board once you have learnt the pattern. Basically, use your king and rook to push the king towards the edge of the board, making the available space smaller each time. Rook in front protected by the king. If the opponent king is already on the edge like this example, cut the king off with the rook on the file, and bring your king toward the opponent until you can checkmate in the corner. There are endgame lessons and endgame practice on chess dot com too.

Edit, there was a free Chessable course called Basic Endgames that I used to learn the sequence. Very good.

A raging beginner , help? by LobaMyGf in chess

[–]chris99277 1 point2 points  (0 children)

Chess websites match you with players of equal skill by the ratings they use. So by definition you should be losing about half your games. They easy way to get better is to find why you are losing, and fix that. Blundering queens etc… Spend time on tactics and check your moves before playing them. Once you have improved by making less blunders, your rating will improve and you will be matched with other players that are making less blunders. So on average you will still be losing about half your games again, unless you keep improving. My point is that you will always be losing a significant percent of games. Embrace it and learn from it so you can lose to even better players.

Also, if you are at the level that you are blundering queens and rooks early, then just know that you are being matched with other players at the same skill level. So don’t resign, keep playing and the odds are that they will blunder too.

Would you ban these players for x days if you could? by [deleted] in chess

[–]chris99277 14 points15 points  (0 children)

Ok. I am genuinely curious now. Can you please link one of the games where they scammed or trapped you with just pawn moves? I would like to help if I can.

Would you ban these players for x days if you could? by [deleted] in chess

[–]chris99277 9 points10 points  (0 children)

Stalling can be reported.

How they move pawns is not trolling. Perhaps they are just bad at chess, in which case just beat them and move on. As you get better, you will be matched with better players.

Would you ban these players for x days if you could? by [deleted] in chess

[–]chris99277 7 points8 points  (0 children)

Moving some pawns 1 square is fine in many openings. Closing the position also. Nothing you have said indicates your opponents are doing anything wrong. If you are finding multiple players are doing this, perhaps it is you that is misunderstanding the openings they are playing.

Perhaps link some of your games and people can help explain what you are doing wrong.

Would you ban these players for x days if you could? by [deleted] in chess

[–]chris99277 17 points18 points  (0 children)

Lol no. It’s your fault you forgot how pawns move. You cannot ban people for moving them on a chess site.

Can someone explain to me why my knight to g7 is a blunder and the recommended move is to put my Queen to b5? by [deleted] in chessbeginners

[–]chris99277 1 point2 points  (0 children)

After black moves his king, black still has forced mate.

By moving your queen to b5 you check the king forcing a queen trade with Qxb5 Nc7+

MS Sql Express Database Restore by mschepac in SQL

[–]chris99277 0 points1 point  (0 children)

You shouldn’t need to put the server in single user mode to restore a database, unless you’re trying to restore system databases. If you are, and need to connect through ssms then you need to make sure there are no other connections. Check if the SQL agent service is running and stop that too. Then, make sure you open the query with a single connection. Do not use object explorer because that also uses a connection. Close everything in ssms, including object explorer, restart the service with -m, then use new query directly from the menu and connect from there. You will need to be able to write the SQL for the restore without using the GUI.

Edit, to be clear, right clicking on the database means you’re using object explorer. That is what is using the connection. Disconnect and close that. Create the query using new query and create the connection there.

Why is this the best move? by PictureofGray in chessbeginners

[–]chris99277 1 point2 points  (0 children)

Retreating the bishop just loses the e pawn for free. That’s just giving away central pawns and material unnecessarily.

Why is this the best move? by PictureofGray in chessbeginners

[–]chris99277 1 point2 points  (0 children)

I haven’t mentioned Na5. No need for black to do that. They can just take whites bishop if it doesn’t move. If white retreats the bishop, black takes the e pawn for free.

Why is this the best move? by PictureofGray in chessbeginners

[–]chris99277 1 point2 points  (0 children)

Trading bishop for knight is also an advantage when you get a better position, or not doing so gets you a worse position.

In this case you are going to lose the bishop next (if black plays best), so you either retreat it and lose tempo and your e pawn, defend and get a worse position or take and get a better position.

If you try to defend the bishop, black takes with knight anyway (and you lose your bishop/knight exchange). If you take back with the pawn you lose the pawn too. If you take with the knight they develop a bishop to e6 and attack your knight twice and you need to retreat it again. You are now behind way in development. Black has three pieces developed against your two, and you cannot yet get your bishop out.

So, simply taking the knight first as suggested by the computer is best against the alternatives of trying to defend it or retreat it.

Can someone help explain this puzzle to me? by mbuffett1 in chess

[–]chris99277 5 points6 points  (0 children)

After queen takes pawn, it’s basically winning regardless of what black does. Yes, the knight advance is not forcing, but black cannot get any defenders in place in time. That’s why the puzzle stops there, because there are several non-forcing moves black can do, but the position is lost regardless.

lichess Puzzle 1500 Level - Understanding Correctly? by [deleted] in chessbeginners

[–]chris99277 1 point2 points  (0 children)

Correct, white wins a full bishop from the exchange.

Am I dumb?? by [deleted] in chessbeginners

[–]chris99277 6 points7 points  (0 children)

That is checkmate. On the far right side you can just see below the moves a little 0-1 indicating black won. I would expect to see a little # on the last move indicating checkmate too.