|
Yes, with a cursor that locks each table, to prevent anyone inserting the G: value after you already checked. It is the only exhaustive, thread-safe, conclusive, and accurate way to know!
A better method by be to ask "why".
|
|
|
|
|
The why is obvious, it's a nonsense request. Must be something clever from a managers' point of view.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
What I'm saying is this nonsense request could have an underlying question that wasn't stated, and could possibly be answered in a very simple and easy way... which would be a win for the one asking... and educational in a way that prevents stupid questions from coming up again, which anger and derail the developers.
|
|
|
|
|
Or worse, a clever programmer!
if (data.Contains("G:"))
{
}
|
|
|
|
|
Nope, sys.tables gives you the tables, sys.colums gives you the columns and sys.types gives the data types.
You have to execute select statements on text type columns. You would have around 1000 select statements to loop through, not the actual data
modified 20-Oct-19 21:02pm.
|
|
|
|
|
You'd be looping all text-columns and memo-fields (up to 2Gb potentially), within all tables. That's two loops, continously crunching on the DB-server. To find a two-character string?
The only correct answer can be that there'd better be a friggin' good reason for the request, and to request what the elephant they were doing so you can write a more specific query. I doubt that the two characters could hide 'anywhere'.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hey, if his live depends on it, I'm suggesting a solution. Actually it's not that bad.
you can:
select TableName, columnName from whatever joins you need to do on all columns that are text, varchar, nchar etc.
Then you run
select count(ColumnName) from TableName where columName like '%whatever you search%'
Let's say 1-2 secs per query on a table up to 1 million records, he will have the answers in a hour or two.
It's a ridiculous request, but you know, if he absolutely needs to do it ...
modified 20-Oct-19 21:02pm.
|
|
|
|
|
Bad Hombre wrote: Actually it's not that bad. Agreed, it is not 'that bad', but it is absolutely not what I want to hear from a specialist. Given the amount of data, and the type of request, and given that you have the freedom to make better suggestions, I'd expect one.
Any decent database-operator will have a backup of anything on that server. Go search that and leave the production database alone.
Ask where the customer "lost his G:", on which page, which application. Ask for a date-range. When did you have your G:? Ask whether it is actually feasible - in a database full with blobs you're bound to run into that combination, how do you know if it is the G: that the client is looking for, or just a random G:? Could it be in an encrypted or compacted field, and if so, do you want to search those too? Do you seriously need to search usernames and hash-columns, any logging-tables, if the customer cannot have lost his G: there?
Bad Hombre wrote: It's a ridiculous request, but you know, if he absolutely needs to do it ... Instead of doing something rediculous because you're simply told to do so, you could try and recognize a failure in communication and offer an intelligent alternative.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I said text columns, not varbinary. This pretty much excludes blobs, also you can exclude columns with max_length let's say 2000 characters.
Edit: And I'm not a database operator, administrator or anything like that, just a lowly mobile developer, so I don't insist on having the perfect solution.
modified 20-Oct-19 21:02pm.
|
|
|
|
|
Bad Hombre wrote: I said text columns, not varbinary. This pretty much excludes blobs, also you can exclude columns with max_length let's say 2000 characters. You might be choosing to actually exclude the columns that are actually required. Without asking, one is just guessing.
Bad Hombre wrote: Edit: And I'm not a database operator, administrator or anything like that, just a lowly mobile developer, so I don't insist on having the perfect solution. Sometimes any solution is better than having nothing. There's no ranks here, so 'lowly' does not apply
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
No, write the query, and send it to him to execute...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
The easiest way to solve this is to insert a new row into a table and have G: as part of the content for a column's data. Now answer "yes" and if he asks for the data, just send him the row you just inserted.
You are welcome.
|
|
|
|
|
Genius!
=========================================================
I'm an optoholic - my glass is always half full of vodka.
=========================================================
|
|
|
|
|
Exactly!!
There are two kinds of people in the world: those who can extrapolate from incomplete data.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
This guy knows what's up...
|
|
|
|
|
Elegance is simplicity. The perfect solution.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
|
I have to side with Wally.
You cannot start normalization without knowing the structure; all the fields need to be known.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
"So, you wanna know if we've a 'G' string riding up next to someone's colon, then?"
Ask a stupid question...
|
|
|
|
|
[Obfuscated to protect the guilty]
Let's take two people, A (who we'll say is female) and B (who we'll say is male). While A is my direct supervisor, I consider her a facilitator. Why? Because she facilitates getting me the information I need. She facilitates making sure I have enough work in my queue to keep me from warming a seat on company time. She facilitates getting me access to internal servers by navigating through the ridiculous request process herself and teaching me how to do it too. Her style is "you have my trust unless you prove otherwise." Her requirements are clearly stated - get the work done within estimates, work with others to get your work done, and as needed, facilitate others in getting their work done.
Now B is the group manager. On my first day I dropped by to say hello and that the first day went well. I didn't get two words out of my mouth before he started talking, telling me I had to have consistent arrival time and departure time. I was then told I'm expected to clock 40 hours a week (as a contractor, I bill hourly, so it would be actually to the company's benefit if I wasn't charging for seat warming time.) B refuses to let people work remotely a day or two a week. This is not a company policy, it is his policy. B appears to have some app that tells him when people arrive, when they log in/out of their computer, etc., that he apparently uses to monitor seat warming productivity. His approach, as has been stated by others, is "you have to earn my trust" but of course what bar that requires vaulting over is never objectively stated.
The difference between A and B is stark. Given my psychological makeup, I am loyal to A, will do whatever I can to make her life easier and for her to succeed. With regards to B, I have to consciously stop myself from daydreaming about dropping my badge on his desk with a "put it where the sun doesn't shine" statement.
Marc
|
|
|
|
|
yes.
The danger with B behaviour is that you always have to second guess yourself to get his approval.
I'd rather be phishing!
|
|
|
|
|
The difference being that A took the time to learn how to manage, whereas B obviously thought he already knows everything there is to know about it.
Unfortunately, there are far more of type B than there type A -- and I'd rather have a type O (as in non-existent) than a B negative.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Normal is style A: you can trust the employed people.
In style B the manager is mistrusting the employed people or the HR decisions.
I judge that B isnt trustworthy, because he isnt a team player.
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
If there is a need, you can always get B by his own ideas. If he wants to observe you, then give him something to observe. You (and the rest of the team) could should log in and out about 3-4 times an hour. He will then have hundreds of entries to check and quickly become overworked. If he complains, just tell him that you had a memory leak, bluescreens, updates, Win10 failures, sunspots and solar flares, space invaders or whatever.
If you keep that up long enough and treat his other ways of overseeing you the same way, he can either simply stop it or else he will crawl on hands and feet in a few weeks. Always be careful what you wish for. You might get it.
The language is JavaScript. that of Mordor, which I will not utter here
This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a f***ing golf cart.
"I don't know, extraterrestrial?"
"You mean like from space?"
"No, from Canada."
If software development were a circus, we would all be the clowns.
|
|
|
|
|
It depends how basic ButtsInSeatsMonitor is. It could easily add up all the login/out times automatically; in which case the screwing around would just mean a bunch of short not working periods that needed to be made up.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|
|