Click here to Skip to main content
15,395,897 members

Comments by CHill60 (Top 200 by date)

CHill60 4 days ago View
   
Reason for my downvote: "old-style" join incomplete and invalid where clause.
Also - old question already answered
CHill60 9-Aug-22 8:04am View
   
:laugh:
CHill60 9-Aug-22 5:11am View
   
You have tagged this as VB6 but state you are using VS 2019 - it can't be both so which is it?
CHill60 9-Aug-22 5:09am View
   
We won't write your code for you. If you really have no idea what to do you need to talk to your tutor.
In the meantime, you still haven't asked a question - what is the problem with the code you have written?
CHill60 8-Aug-22 5:16am View
   
This is not a solution. If you have a question then use the red "Ask a Question" link
CHill60 8-Aug-22 5:15am View
   
Those two files that you have now posted are identical. The query I posted 4 days ago is the solution to your problem if you use idt where I have used id
The query you posted in the comments here is wrong - you cannot join the tables on Symbol
CHill60 7-Aug-22 14:33pm View
   
Step 1 on your journey to solving your problem... learn the difference between asking a question and proposing an answer to a question. Use the red "Ask a question" link at the top of the page...but be sure to read the guidelines you will find there
CHill60 4-Aug-22 11:46am View
   
Give more detail. Why doesn't it solve the problem and why couldn't you set up the rule?
CHill60 4-Aug-22 11:43am View
   
Sorry, I'm not opening unknown files. All you had to do was provide the information in your question
CHill60 4-Aug-22 4:15am View
   
A Date in SQL is not a string. It is a Date. It might look like a string when being assigned like that, but it is still a Date, no casts or conversions are required at all. It is actually stored as a 3-byte integer. You will gain no speed whatsoever by using "unix time"

Views are just that - views of the underlying data tables. They are essentially just queries that create virtual tables from the persisted data below. They do not necessarily simplify the data returned - particularly if they use joins to amalgamate data. They can make queries faster to write but only indexed views can really aid performance and you failed to mention that in your inaccurate comments
CHill60 4-Aug-22 3:52am View
   
You don't know if that is the case and even if it is only the path, you are just repeating what was said in Solution 1
CHill60 4-Aug-22 3:48am View
   
Quote: "you have made the choice to use a so heavy Date Formating : ex : 2022-07-01... It's a string type."
No, it's not. It's a date, actually a datetime as is clearly indicated
DECLARE @START_DATE datetime = '2022-07-01';
It is absolutely good practice to use the correct data types.
I also disagree with your comments about Views - they are no more lightweight than a classic select if not written properly. "Views are generally used to focus, simplify, and customize the perception each user has of the database" - Views - SQL Server | Microsoft Docs[^]
Quote: "It's a db design error you're facing." - in what way? Tables look to be reasonably normalized from what we can see in the question.
CHill60 4-Aug-22 3:42am View
   
Please don't post two solutions to the same question - it can become confusing - solutions are not always presented in the order they were posted. You can use the "Improve solution" link to update solutions
CHill60 4-Aug-22 3:34am View
   
You implied that the name of the column in the tables was "id" and the way you described the problem was that id=2 was the row you wanted to insert into a third table. Your amended query will get the same results - but by accident rather than by design.
To get accurate solutions you must provide accurate information - that should include the correct names of columns in your tables, some sample data (more than you have given here - I would suggest at least 2 mismatching rows in this case, but not so much it becomes onerous to type). You should also include expected results for the sample data given.
CHill60 1-Aug-22 10:49am View
   
Good spot! 5'd
CHill60 1-Aug-22 10:45am View
   
:thumbsup: :)
CHill60 1-Aug-22 9:01am View
   
Why could you not use CTE?
CHill60 1-Aug-22 9:00am View
   
"If someone responds correctly, I'll give them a "Reputation point"." - If someone does respond correctly please do not give them one "star" - Reputation points are earned by answering questions, posting comments, etc etc etc. and by having a post "up voted". One star is actually a downvote and will result in reputation points being deducted from the member. If an answer is useful to you then you can "accept" the answer and the member will get more points.
See Member Reputation System[^]
CHill60 1-Aug-22 8:43am View
   
An unformatted, uncommented code dump is not a solution
CHill60 1-Aug-22 8:42am View
   
If this is intended for 12 million records then perhaps you should be using Sagemaker for your POC - Excel is a wholly inappropriate tool for volumes like that.
CHill60 1-Aug-22 5:38am View
   
Nothing to do with the original question and the wrong forum anyway. Take this to the Message Boards
CHill60 1-Aug-22 5:33am View
   
No it does not help. You are treating the same scenario in two different ways - frankly I cannot help you with that. I am in the process of updating my solution with some specific formulae. After that you are on your own.
By the way, I'm surprised this hasn't been closed, as Excel formulas are not "coding"
CHill60 1-Aug-22 4:01am View
   
For item# 2 rat there is no row corresponding to item# 1 in sheet B either - but for that one you have put "False" instead of "Not Found" - your logic is flawed, or you are missing out some important information
CHill60 29-Jul-22 5:31am View
   
You have item# 1, rat = not found
Item# 2, rat = false
There is no type rat in your sample, but two different results
As I said, your logic is not clear.
However, the technique I have described will help you identify matches/missing items
CHill60 28-Jul-22 15:05pm View
   
Concat will work with numerics, at least it did in the version of excel I use.
Looking at your example you are not just matching in type or value but on item + type and item + type + value, so you would need two working columns and two match formulas.
Your logic for true/false/not found/na is not clear
CHill60 27-Jul-22 12:46pm View
   
Can you share a couple of examples of the data you inserting into the database and what you are getting back. Can you also share with us the column definitions of the table?
CHill60 27-Jul-22 7:39am View
   
You've added nothing new to this thread, it's the same technique from Solution 1 except this isn't as tidy and you have provided no commentary.
CHill60 27-Jul-22 7:36am View
   
What does this have to do with the question? Answer, nothing at all
CHill60 27-Jul-22 3:39am View
   
What happens when you run your code?
CHill60 26-Jul-22 10:41am View
   
"but all code on internet is absolutely monstrous." - unless it's on this site of course! :laugh:
CHill60 26-Jul-22 4:14am View
   
A code dump without commentary is just a code dump, it is not a solution to anything. Especially a C++ code dump in a thread tagged as C#
CHill60 26-Jul-22 4:12am View
   
"that does not work" is the least most useful thing to use to describe your problem.
How are you inserting the records?
How are you comparing the records?
Where is the code that you have tried to use?
CHill60 26-Jul-22 3:29am View
   
Not necessarily - read Solution 1
CHill60 25-Jul-22 12:45pm View
   
"There is no common column in both tables" - yet in your SQL you have
WHERE CHARTER.MOD_CODE = MODEL.MOD_CODE
Is it in the charter table or not?
"Since the datatypes are different" - you haven't told us what data type you have used for MOD_WAIT_CHG just that it contains 100, which is Numeric, so not different.
Edit your question and show us the table schema after you have added the extra columns (or at least share the ALTER table script)
Then give us some sample data for each table, and what you want the results to be
CHill60 25-Jul-22 12:32pm View
   
More than one line of sample data would be appropriate, and you should include some expected results
CHill60 25-Jul-22 6:58am View
   
OP did not ask for code to upload a file 10 years ago but how to rename it with respect to specific criteria, not some random content.
CHill60 22-Jul-22 12:50pm View
   
A code dump without commentary is just that - a dump. It does not make for a solution
CHill60 22-Jul-22 9:52am View
   
Be aware that if you don't delete this "Solution" then your question will no longer appear in the list of unanswered questions, which means fewer people will view it, which means you are less likely to get any assistance
CHill60 22-Jul-22 9:15am View
   
Good spot! I stared at this for ages. One small point though - DTa is already declared and used on the line above. Might be worth clarifying that bit of code
CHill60 22-Jul-22 7:54am View
   
This is going to sound silly but ... try restarting your machine. There may be an instance of the program "stuck" in memory (not the correct technical term!). I used to see this a lot with earlier versions of Visual Studio - for me it used to manifest as not being able to build the solution but it's worth a try to at least discount this as an issue
CHill60 22-Jul-22 7:48am View
   
Then bind your data to a tabular format control Advanced Basics: Data Binding in Visual Basic .NET | Microsoft Docs[^]
CHill60 21-Jul-22 8:51am View
   
Definitely not received or just not handled by your code?
CHill60 21-Jul-22 8:41am View
   
OP is responding via the medium of a "Solution" - I've update their post with their extra info and advised them to delete the solution
CHill60 21-Jul-22 8:38am View
   
If you want to respond to a solution then use the "Have a Question or Comment?" link next to it. The poster will be notified that you have responded. I will add this information to your original question on your behalf, then I strongly advise you to delete this "Solution"
CHill60 21-Jul-22 8:16am View
   
Highly unlikely that you would need a cursor ... for anything. There is usually a set-based way to do it
CHill60 21-Jul-22 8:14am View
   
My 5. I was with Richard, thinking it cannot be done. I have learned something new today - thank you
CHill60 21-Jul-22 8:02am View
   
If you haven't made the changes I have suggested it would explain why the query takes so long in either MySQL or MSSQL. Using a Materialised view in MSSQL means it only looks at incremental changes so will be faster after having been run the first time.
If you haven't added the same indexes to the tables in both platforms, then again, that would be a reason for the difference.
If you really want to understand what is going on then I suggest using Query Analysers
MySQL : Chapter 9. The Query Analyzer Page[^]
MSSQL : Analyze an Actual Execution Plan - SQL Server | Microsoft Docs[^]
The way the databases are hosted could also be a factor in the performance differences you are seeing
CHill60 21-Jul-22 6:06am View
   
You were given some very sound advice on your earlier question. It is incredibly difficult to answer questions of this type without a description of the table, some sample data and your expected results - it helps to overcome problems with the English language too
CHill60 21-Jul-22 5:49am View
   
It seems the OP is using File, Save As to save the Excel file into CSV format. They are then using C# to process the CSV :facepalm:
CHill60 21-Jul-22 5:43am View
   
Well you said earlier that you were using a materialized view. As those don't exist in MySQL (afaik) that would explain the difference - assuming that the table and index schemas are identical
CHill60 20-Jul-22 6:12am View
   
Good news! My pleasure
CHill60 20-Jul-22 3:22am View
   
Not a solution, but your code is open to SQL Injection attacks - never concatenate user input into strings to form a sql command see SQL Injection Attacks and Some Tips on How to Prevent Them[^]
CHill60 20-Jul-22 3:20am View
   
Except the question was tagged C# and whilst "easier" this will put a message box up on the non-existent screen on the host server. Strictly speaking a string of length zero is not null it's empty. None of this helps anyone overcome the actual problem, unlike the 10 year old accepted solution.
CHill60 19-Jul-22 10:14am View
   
Many people fall into the loop trap! Glad you now have it sorted. This article (it's mine) might help too Processing Loops in SQL Server[^]
CHill60 19-Jul-22 5:49am View
   
Your views are returning strings instead of dates - leave the formatting of data to the UI layer.
Also your where clause
AND (NOT ((`c`.`Name` LIKE '%Testing%))))
renders the query non-sargable (see Sargable - Wikipedia[^]). Tidy up your data to remove any Testing rows or impose a rule that "Testing" must be the first word in the Name so you can change there where clause to
AND (NOT ((`c`.`Name` LIKE 'Testing%))))
. Check that you have indexes on appropriate fields on each table e.g. best practices for mysql performance optimization[^]
CHill60 19-Jul-22 4:55am View
   
Troubleshooting:
1. You have NOT used the logic I supplied in that code - only the part that turns CD values negative. You need all of the query.
2. Get rid of the loop - SQL is a set-based language and there are very very few times you need a loop.
3. Get rid of where RNO = @x - that, and your loop is what is breaking your results
4. Use
select 
	RNO
	,DOT
	,TXN_TYPE
	,CHQ_NO
	,TXN_AMOUNT
	,SUM(TXN_AMOUNT) OVER (ORDER BY RNO) as RUNNING_TOTAL
from #TxnData;
without a loop
CHill60 18-Jul-22 11:14am View
   
Note that I have updated my solution with another observation
CHill60 18-Jul-22 11:09am View
   
Is this with MS-SQL or MySQL? And what version?
Also note my comment in my solution : "You will need to share details of your table/view schemas for a fuller analysis"
CHill60 18-Jul-22 8:19am View
   
A code dump without commentary does not make a good solution. As the original question is over 11 years old, you are likely to find this solution downvoted, probably several times. You should add some words indicating that this code will give you a count of how many times each unique letter appears in the word or phrase.
I would also advise against adding solutions to such old questions unless you really highlight the new technique that you are bringing to the thread
CHill60 18-Jul-22 7:07am View
   
A code dump without any commentary is just that - a code dump. It is not a solution. Nor do you appear to be attempting to add anything new to the four-year-old thread. Best to stick to new questions where the OP still needs help, but if you do choose to add a solution to an already solved question, make sure you comment as to what your solution adds that isn't present in the others
CHill60 18-Jul-22 4:10am View
   
This is not an answer to the question. If you have a question then use the red "Ask a Question" link at the top of the page. First note the posting guidelines which will tell you to do your own research.
I am going to edit your non-solution to remove your email address - this is an open forum that spam bots can scrape - you are just inviting spam
CHill60 18-Jul-22 4:08am View
   
This is not a solution to the original post. If you have a question then use the red "Ask a Question" link at the top of the page - and put some details in the post!
CHill60 15-Jul-22 11:38am View
   
I've fixed my bug in the order by clause
CHill60 15-Jul-22 4:32am View
   
try month instead. Or look up DATEPART in w3schools SQL Server DATEPART() Function[^]
CHill60 15-Jul-22 4:22am View
   
You need to list the specific problem(s) you are having
CHill60 14-Jul-22 13:51pm View
   
And my thanks instead of the OP :-)
CHill60 14-Jul-22 5:19am View
   
Besides, that was on the C# forum and this was tagged "Java" - so we're good :-)
CHill60 13-Jul-22 8:46am View
   
Please edit your question and use the proper pre-tags and remove the rogue items such as "Copy Code" - it is impossible to tell what you actually put into the tool
CHill60 13-Jul-22 7:46am View
   
The code
int PulseSensorPurplePin = A0;
results in the error "main.cpp:3:26: error: ‘A0’ was not declared in this scope"
CHill60 13-Jul-22 7:37am View
   
What - all that information in Solution 1 not detailed enough for you?
CHill60 13-Jul-22 4:51am View
   
What is your question?
CHill60 12-Jul-22 12:00pm View
   
"Microsoft 365 for enterprise" is the desktop equivalent - I'd sort of assumed that's what the OP meant. But it would be quite funny if it wasn't :-)
CHill60 12-Jul-22 11:52am View
   
Not with the sample data you shared on those links and not with the code in my solution it doesn't.
SQL Fiddle[^]
CHill60 11-Jul-22 11:27am View
   
It would have helped to share the definition of term but my first thoughts are - provide a Term.ToDouble function or a Term.CompareToDouble
CHill60 11-Jul-22 8:59am View
   
"they do not work." tells us nothing about your problem. What happens? What is different between the versions? Also is this 32bit or 64bit and which OS are you using? All information that will help you get an answer to your problem
CHill60 11-Jul-22 4:50am View
   
I'm not sure that your logic around if the result is less than zero it is morning otherwise it is pm - it's a lot easier to say if the number is less than 12 it's am otherwise it is pm and in the latter case subtract 12. You've also missed the special case of midnight (00:00hrs)
CHill60 8-Jul-22 8:32am View
   
Don't put that stuff in the catch! The catch is there to deal with errors and all you are doing is hiding what the actual problem is. Remove the try-catch entirely and you should get an error message telling you what the root cause is
CHill60 8-Jul-22 8:28am View
   
Please read my solution carefully. I told you that you would get that error .. Quote: "that query won't work in Access - it will complain that the JOIN is not an updateable query, despite the fact you are only attempting to update one of the tables" You MUST redirect the output from the sub-query into a new table and join to that table.
CHill60 8-Jul-22 5:56am View
   
No relationship is required. When you say "not solved" what exactly is happening?
CHill60 7-Jul-22 8:27am View
   
Simply repeating the error message thrown by your own code is not a solution to this problem
CHill60 7-Jul-22 4:19am View
   
I don't have to give a solution. The solution is ALREADY posted as "Solution 2". The original problem has NOTHING to do with opening a file - read the question!!
Cells(Temporary, 8).Formula = "=INDEX($A$2:$B$" & UtlimaRigaDATI & ";MATCH($J" & Temporary & ";$A$2:$A$" & UtlimaRigaDATI & ";0);2)"    '<----- ERROR LINE
CHill60 5-Jul-22 14:10pm View
   
Your sql command is vulnerable to SQL Injection attack. You were using command parameters earlier, you should still be using them
CHill60 5-Jul-22 12:47pm View
   
I know how to save a workbook. Your "solution" does not address the problem that the OP posted
CHill60 5-Jul-22 12:46pm View
   
Keep formatting in questions here? When you paste stuff in you should get a pop-up menu. Iusually use "Paste as is" then select all the code and use the formatting tool "Code" at the top of the input box. You will see a list of languages appear
CHill60 5-Jul-22 6:54am View
   
Apart from the fact the question is 5 years old and already has an accepted answer, you have effectively just copied solution 3 - with one major mistake - the first parameter for mysql_query() is the connection. Passing the query twice will simply just not work.
Stick to answering more recent posts where the OP might actually remember the post, and make sure your solution is both accurate and brings something new to the thread
CHill60 4-Jul-22 9:57am View
   
That's up to you, I can only advise you on best practice.
CHill60 4-Jul-22 8:49am View
   
"What is the method ..." is a question. By posting your query/question/need for information as a solution you are severely limiting the number of people who will see it. GaryDoo doesn't appear to have been active in this site since 2015, so you are better off asking the general population rather than an individual.
Note however the posting guidelines. You are expected to do your own research first e.g. print to thermal printer from android over network - Google Search[^]
CHill60 4-Jul-22 8:45am View
   
Yes, strictly speaking it is possible but it is not good practice (and many will think it is lazy). Using wildcards like * leaves you vulnerable to changes in the table schema and assumes that exactly the same number of columns in the same order are on both tables. It is better to be completely in control of your own code.
It is easy enough to generate a list of columns on a table to paste into your code e.g. MySQL get column names – thisPointer[^]
CHill60 4-Jul-22 5:52am View
   
If you have a question then use the red "Ask a Question" link at the top of the page. Do not post questions or comments as a "solution" to another member's question.
CHill60 4-Jul-22 5:51am View
   
The error is quite clear - remove the ORDER BY in your sub-queries
CHill60 4-Jul-22 5:49am View
   
What are the values in each of those parameters?
CHill60 4-Jul-22 5:44am View
   
Nothing to do with the original question and stop posting multiple solutions
CHill60 3-Jul-22 10:46am View
   
If you want to post a comment then use the "Have a Question or Comment?" link next to the post. This is not a solution
CHill60 2-Jul-22 3:49am View
   
Nope - it copies the formulas. Just adjust the ranges to reflect the columns you want and use the technique inside the "with" not the "alternatively..." bit
CHill60 1-Jul-22 11:26am View
   
What is this meant to be?
CHill60 1-Jul-22 6:03am View
   
The error is quite clear - Mapping in not in collections
CHill60 1-Jul-22 5:21am View
   
Far better is
INSERT INTO hhh (name) VALUES ('john');
- that way if any defaults are set on any of the NULL columns then they will be applied.
CHill60 1-Jul-22 5:17am View
   
You have been told before - if you want to comment then use the "Have a question or Comment?" link next to a post, or update your original post.
CHill60 1-Jul-22 5:09am View
   
No, not clear at all. However, I have told you what was wrong with your SQL and explained how to fix it. Applying the logic for your scenarios is now down to you
CHill60 30-Jun-22 9:57am View
   
If this is a Delphi problem then you should tag your question as Delphi not SQL. I've never coded in Delphi so I can't help you any further.
However, by saying that I wanted you to state the problem clearly I had hoped that you would note the comment "there is no substitute for supplying sample data and expected results when trying to get an answer to a problem" so update your question with a table showing what is on each row of each table, another table showing what your expected results are for that sample data and another table showing what you are currently seeing
CHill60 30-Jun-22 9:53am View
   
You haven't told me anything in your question about accounting logic, you supplied sample data and expected results that did not match that sample data. I have fixed the problem with your code, you apply the necessary logic e.g. use WHERE L.LID <> 2.
However, your comment makes me believe that you are actually srinivas seshadri and are using two accounts on this site. That is suspicious behaviour so you have both been put on a watch list
CHill60 30-Jun-22 9:14am View
   
What is your question or problem? This is just a code dump
CHill60 30-Jun-22 9:13am View
   
Where is the OP meant to put that formula in a CSV (which does not support formulas)? See the full explanation of what is happening, why it is happening and how to avoid it, in Solution 1
CHill60 30-Jun-22 9:10am View
   
The OP quite clearly marked which line was causing the error - it was no where near the Open statement.
CHill60 30-Jun-22 9:05am View
   
Scrolling is not relevant! My query cannot possibly add fields - the only field I added was Cod_orc so you can tell which calculated value belongs to which row. Try stating CLEARLY what you are expecting to see - there is no substitute for supplying sample data and expected results when trying to get an answer to a problem.
Focus on the results of your query and not on how you are displaying them. If the results are correct but the display is not, then the problem is in your secret code in the secret language in the application you have not mentioned at all
CHill60 30-Jun-22 9:01am View
   
I'm not an accountant, I'm a developer who happens to have shown the OP where their problems lie with their code. Feel free to post a solution that gives the results the OP wanted for their homework - assuming they share their actual data with you in order to achieve that
CHill60 30-Jun-22 6:00am View
   
"it didnt works" does not provide us with any useful information. Exactly what did or did not happen
CHill60 30-Jun-22 5:34am View
   
I have updated my solution
CHill60 30-Jun-22 5:21am View
   
Part of the problem with trying to help you is that the column names in your query do not match the schema of the tables with the sample data - e.g. there are no columns called Debit and Credit - help us to help you and give us the correct table schemas/sample data.
CHill60 30-Jun-22 2:51am View
   
I've updated my solution
CHill60 29-Jun-22 12:55pm View
   
I have updated my solution to hopefully clarify what is happening
CHill60 29-Jun-22 12:39pm View
   
Is this meant to be a solution?
CHill60 29-Jun-22 12:34pm View
   
You do use "m" but not the variable IntervalType .. for example you use
Jubilacion = DateAdd("m", 395 - Restante, Hoy)
but you could have used
Jubilacion = DateAdd(IntervalType, 395 - Restante, Hoy)
OR just remove the line
IntervalType = "m"
altogether as you do not use the variable anywhere.
Is that clearer?
CHill60 29-Jun-22 8:55am View
   
You are already doing a join, just an implicit one. See my solution.
You should have updated your original post with this information OR responded to Solution 1 by using the "Have a Question or Comment?" link. "Solutions" are for answers to questions only, not conversations
CHill60 28-Jun-22 11:09am View
   
Good spot - I missed that test case when I checked it and suggested Piebald posted it
CHill60 28-Jun-22 10:03am View
   
Looking at the way you have just thrown some extra \ characters in there, you might find this link useful Regex Cheat Sheet[^]
CHill60 28-Jun-22 10:01am View
   
Tested for you - it works. Definitely a solution to post
CHill60 28-Jun-22 7:16am View
   
What does "not working" mean?
You are getting incorrect values because float only stores approximate values - read the link I provided. For example : for part 20980 the difference is 0.010000000000000001942890293094 - which is greater than 0.01

To get more accurate results use decimal for the column types instead. Then your code will work.
CHill60 26-Jun-22 9:32am View
   
You have to hope that in the 9 years since the OP posted this question they have either learned how to build a project or given up on coding entirely.
You have made some not entirely accurate remarks based on several assumptions - that there is a dll and an exe involved - nothing in the question suggests this, and that there are no other files associated with this project at all. There is absolutely no need to delete everything else in the publish folder and if a reader is using data, associated dlls, other resources or configs that do need to be in the publish folder then your advice will break their build entirely.
CHill60 24-Jun-22 7:33am View
   
A word to the wise - answering "old" questions that already have solutions is often perceived as "rep point hunting" and in the past has led to accounts being suspended. My advice is to stick to posting solutions to more recent posts, and if there is already a solution posted, make sure you add commentary to explain why yours is better/different/an alternative approach.
CHill60 22-Jun-22 10:58am View
   
"Then your update/insert should work." - not if there are different columns on each version of the contacts table, and not if the OP doesn't specify the database link
CHill60 20-Jun-22 12:18pm View
   
Nothing to do with the original post.
CHill60 20-Jun-22 12:13pm View
   
Firstly, I am demonstrating that I have not kept in touch with latest developments. I tried to demonstrate the problem with an example, but my example completely ignored the rows containing null, whereas I was expecting every row with a null in that column to match to every other row with null. I.e. instead of getting 2 rows returned I would get 4.

This article describes the problem far better than I can - Join SQL Server tables where columns include NULL values[^]
CHill60 20-Jun-22 7:40am View
   
Not simple at all. You have in your query
and rn='RN 002 2022'
but according to this data sample that should be
and id_fakture='RN 002 2022'
CHill60 20-Jun-22 7:35am View
   
D'oh. I'll update the solution. Thank you!
CHill60 20-Jun-22 5:48am View
   
If you want to remove id 15 then why are you using id_fakture = 7 in your query?
CHill60 20-Jun-22 5:16am View
   
Won't work if table already exists (the declaration certainly does otherwise the OP's code would not have run), nor if any of the columns already exist. Better would be to find out how table is currently populated and to fix the underlying problem. However, the OP didn't respond a year ago so I doubt they will respond now
CHill60 20-Jun-22 5:08am View
   
Not a solution to the question.
CHill60 20-Jun-22 5:06am View
   
A code dump without commentary is not a good answer, and doing someone's homework for them helps no-one
CHill60 20-Jun-22 5:06am View
   
A code dump without commentary is not a good answer, and doing someone's homework for them helps no-one
CHill60 20-Jun-22 5:06am View
   
A code dump without commentary is not a good answer, and doing someone's homework for them helps no-one
CHill60 20-Jun-22 5:05am View
   
A code dump without commentary is not a good answer, and doing someone's homework for them helps no-one
CHill60 20-Jun-22 5:05am View
   
A code dump without commentary is not a good answer, and doing someone's homework for them helps no-one.
CHill60 15-Jun-22 9:11am View
   
If you still need a solution to this then you will need to provide more information. See the comment from Wendelius for starters.
Are the values in ToBeSettled for rows 6 & 7 your attempt to distribute the incoming value, should the spread be added to that value or what.
When should the MaxMonthlyPayment be applied e.g. does Paid Amount contribute to that limit or not?
It's impossible to help you with such little information
CHill60 15-Jun-22 5:02am View
   
There is no image attached - you cannot attach images directly here, but you can include a link to an image - assuming members are happy to click on it. My recommendation would be to give a better description of your problem - including the code that you have already tried
CHill60 13-Jun-22 12:08pm View
   
This makes no sense whatsoever, there is only one table in play so what is "other table" meant to be?
CHill60 13-Jun-22 11:57am View
   
A code dump without commentary is not a good solution
CHill60 2-Jun-22 2:52am View
   
This comment does not make any sense at all. I have no idea what you are saying but I did get a couple of points. Yes that syntax does work but you are limited to inner joins only, the where clause is messy and difficult to separate the filtering from the join criteria. It IS old, old-fashioned and not best practice.
Any query with 15 tables becomes messy - especially using your style. And quite possibly not efficient.
CHill60 1-Jun-22 11:47am View
   
There is nothing wrong with the query
SELECT A.* FROM assessment_performance A WHERE A.id = someValue;
The A is an Alias for the table assessment_performance
Also, using a comma separated list of tables with a where clause to join them went out of date with ANSI-92 Syntax. You should use an ON clause instead e.g.
SELECT columnlist FROM TableA A JOIN TableB B ON A.ForeignKeyColumn = B.PrimaryKeyColumn;
CHill60 30-May-22 10:26am View
   
The "What I have tried:" section is where you are meant to put the code you have tried so far. We are more than happy to help but we will not do your homework for you
CHill60 30-May-22 7:19am View
   
Have you sorted this out now?
CHill60 30-May-22 3:07am View
   
This is not an answer. If you have a question to ask then use the red "Ask a Question" link at the top of this page
CHill60 30-May-22 3:04am View
   
If you have a question then use the red "Ask a Question" link at the top of the page. Do not post questions or comments as solutions to others posts. Be sure to read the posting guidelines provided on that link - you will need to provide much more information than you have here
CHill60 30-May-22 3:02am View
   
The space is not relevant. This code
Console.WriteLine("Hello \r \n World");
will give the output
Hello    World
Note the space before "World". If you read the other solutions and the associated comments you will quickly realise that the output was intended for HTML so using <br> was the correct solution - as indicated by the OP marking those solutions stating that as the "Accepted Solution" back in 2014
CHill60 30-May-22 2:56am View
   
This is not a solution. If you want to comment on a post then use the "Have a Question or Comment?" link next to the relevant post.
CHill60 30-May-22 2:55am View
   
This is not a solution. If you need to ask a question then use the red "Ask a Question" link at the top of the page, and be sure to read the Posting Guidelines provided
CHill60 30-May-22 2:53am View
   
If you want to ask a question then use the red "Ask a Question" link at the top of this page. Be sure to read the posting guidelines there, because you will need to provide much more information than you have here!
CHill60 30-May-22 2:50am View
   
One small piece of advice - avoid using SELECT *. It is better to list the actual columns you need - that way if the table schema changes (add/remove columns) your code does not break
CHill60 26-May-22 10:05am View
   
Don't you think it would have been a really good idea to have included that information up front?
Looks like the FTP site is not set up to handle non-passive requests, so make sure that the port is open - you may need to speak to whoever administers that site
CHill60 26-May-22 5:33am View
   
If you want to comment on a solution then use the "Have a Question or Comment" link next to it. This is not a solution to the original post and it doesn't look as if your attempt to tag wombaticus has worked, whereas a comment to their solution will generate a notification
CHill60 26-May-22 3:13am View
   
If you look to the right of this comment you will see a list of "Related Questions" - Research is always a good place to start and many, many people have posted the same homework question time and time again.
Beware! Your tutor will also have seen many, many internet answers and will know if you just copy something. Try to work it out for yourself
CHill60 24-May-22 9:58am View
   
I see that Solution 3 gives you another option
CHill60 24-May-22 9:57am View
   
I've added some information to my solution
CHill60 23-May-22 8:28am View
   
This appears to be related to your other question How to handle sticks on column country ?[^], but replacing the country names with id numbers. Instead of drip feeding questions (again) try explaining what it is you are trying to achieve and why. You are more likely to get a useful answer that way
CHill60 23-May-22 8:13am View
   
What has checksum hashing got to do with this question - I don't understand what you are asking
CHill60 23-May-22 3:55am View
   
This has nothing to do with the question. If you want to ask your own question use the red "Ask a question" link at the top of the page
CHill60 21-May-22 5:37am View
   
That depends very much on what you are trying to do!
I use CTEs in Power Query/Power BI all the time.
So the short answer is "no" but that doesn't mean there isn't a solution to your problem... if only we knew what that was
CHill60 17-May-22 4:30am View
   
We have asked for more detail and some clarification of your problem. If you still want help you are going to have to help us to help you. Gerry Schmitz and I have pointed out some inaccuracies in your data and I have asked a specific question. Without this additional information we cannot even try to help you.
CHill60 13-May-22 13:45pm View
   
Don't use error handling to handle potential data anomalies that you can very easily handle properly with code.
Error handling is for errors, not validation
CHill60 13-May-22 8:37am View
   
Beware - I've just noticed it says
j==
for the decrement, that should be
j--
CHill60 13-May-22 4:17am View
   
What are the values of Row1 and Row2 and what is in the range N(Row1) to N(Row2) - that is likely to be the cause of your problem
CHill60 12-May-22 15:13pm View
   
You need to describe the problem with more clarity. Based on the data you have posted session 22 starts at 08:14 but ends at 08:18 not 08:14. And this whole counting sessions thing - what is the relevance of the 30 minutes if you are counting session 11 as one and session 22 as one - do you mean anything of e.g. 40 minutes should be counted as two sessions? I.e. Up to 30 minutes is a session, 31 to 60 minutes is another session, 61 to 90 minutes is third etc etc?
CHill60 12-May-22 14:44pm View
   
What has this got to do with coding?
CHill60 12-May-22 14:42pm View
   
Looks like you jumped a little too quickly into asking other people for help - it took you 5 minutes to find the solution to your own problem. There's a lesson there ...
CHill60 12-May-22 8:32am View
   
An uncommented code dump is not a solution
CHill60 11-May-22 7:53am View
   
If you want to ask a question then use the red "Ask a Question" link at the top of this page. Be sure to read the posting guidelines and include enough information so that an answer is possible
CHill60 11-May-22 7:51am View
   
You've posted 3 different solutions to this 9 year old question. At best this is confusing, at worst it looks like "reputation point hunting"
If you need to add information to your original solution then use the "Improve solution" link next to it - I strongly advise you to do that and then delete Solutions 4 and 5
CHill60 10-May-22 10:47am View
   
either your username or your password is incorrect or username does not have insert permissions on your database
CHill60 10-May-22 4:17am View
   
"SELECT * FROM 'masterlogin' WHERE 1" - This SQL does not appear in the code you posted.
Also, do not store passwords as plain text, see Password Storage: How to do it.[^]
Some of this code is about registration - if that is not where the problem is then remove that code, it is not relevant to your problem and is distracting (not many members will be prepared to go through that much code with such a vague description of the problem)
CHill60 9-May-22 7:19am View
   
You have already said that bit. My question is WHY not how. Hashing is not meant to be reversed
CHill60 9-May-22 7:10am View
   
Why do you need to do this? The whole point of hashing is that you can't unhash
CHill60 8-May-22 8:27am View
   
This is not an answer. There is already a solution posted
CHill60 5-May-22 10:22am View
   
This has nothing to do with the original post
CHill60 5-May-22 8:06am View
   
Please read the posting guidelines and use the "Improve question" link to share the code you are using
CHill60 5-May-22 8:04am View
   
An unformatted code dump is not an answer
CHill60 4-May-22 6:41am View
   
If you want to comment on a post then use the "Have a Question or Comment?" link next to it
CHill60 3-May-22 10:13am View
   
If you have a question then use the red "Ask a Question" link at the top of this page. Do not post questions or comments as solutions to another member's post.
Be sure to read the posting guidelines and supply enough information for someone to answer your question
CHill60 3-May-22 4:02am View
   
I've added some information to my solution
CHill60 30-Apr-22 15:34pm View
   
If you want to ask a question used the red "Ask a Question" link at the top of the page. Do not post questions or comments as solutions to another member's post
CHill60 29-Apr-22 10:40am View
   
Did you notice the date of the OP?
CHill60 27-Apr-22 4:09am View
   
I know what you want to do, you keep repeating it. I asked you which of the potential solutions offered have you tried and what went wrong. I will also state again the obvious solution which is "Don't change the name of the column"
CHill60 27-Apr-22 3:57am View
   
I have offered you several means of achieving this. Which ones have you tried and what went wrong?
CHill60 26-Apr-22 12:06pm View
   
If you want to be a coder you are going to have to learn to be more precise. " it showed the wrong ouput." What output did it show.
Use the Improve Question link to put these details into your original post
CHill60 26-Apr-22 11:49am View
   
What makes you think there is a problem - describe the problem clearly
CHill60 26-Apr-22 9:50am View
   
"Any idea for a piece of code or a module?" - Plenty of ideas. Are you going to pay for them?
CHill60 26-Apr-22 9:32am View
   
Why figure out the output if there is an existing VBA program that does what you need? But again - what does "match over 90% of all sales orders" actually mean? What matches what?
CHill60 26-Apr-22 9:10am View
   
The "What I have tried:" section is where you are meant to put the Python code that you have already tried to write. You should also include the expected results from the sample data provided and clarify what you mean by "match up with each other item" - i.e. match on what?
CHill60 25-Apr-22 7:26am View
   
You have already been told this is an English language site. Use English only please.

On vous a déjà dit qu'il s'agissait d'un site en anglais. Utilisez uniquement l'anglais s'il vous plaît
CHill60 25-Apr-22 5:48am View
   
Share the code not a link to your site.
CHill60 25-Apr-22 3:37am View
   
An uncommented code dump that has nothing to do with the original question will at best get you downvoted. At worst it can get you removed from the site for Abuse. Don't do this.
CHill60 22-Apr-22 5:43am View
   
Try rewording your question so that it actually makes sense.
Also - there are 15.2 million members on this site, some of whom get annoyed when people assume they are all male. Drop the "Sir" to avoid alienating 16% of people who could potentially help you
CHill60 22-Apr-22 5:31am View
   
Nowhere in the code you have shared is a call to BOOK_INSERT. It might be in the code for BookAdapter.Insert, but you haven't shared that code either. These facts make it very difficult to provide you with much help.

However, the error seems to be quite clear. The secret function BOOK_INSERT takes some parameters, one of which appears to be the name of a PDF file. Your code has not supplied that value. Debug your code to determine why.
CHill60 22-Apr-22 5:24am View
   
How to get an answer to your problem.
1. Use the "Improve question" link to edit your post
2. In the "What I have tried:" section paste the code that you have already tried
3. In the Description of your problem type in your expected results and your actual results

The really important bit here is "paste the code that you have already tried"

This is either homework or a learning exercise, so for it to be of any value to you, you must be the one that at least attempts to solve it. We will not just write a solution for you
CHill60 22-Apr-22 5:20am View
   
I am not going to follow that link off-site. Post your code here, as code not a photo
CHill60 21-Apr-22 11:14am View
   
Share the code you have used for a single insertion and we might be able to tell you the changes to make to insert multiple records
CHill60 20-Apr-22 8:29am View
   
Get rid of the empty catch clause and you might get to see the error that is raised
CHill60 13-Apr-22 11:21am View
   
An uncommented, unformatted code dump is not a solution. What if your text boxes had something other than numbers in them (or were blank, as some of them will be) - you will get errors galore. Plus you are repeating code - abstract that out into a function! I'm afraid this is a very poor solution
CHill60 13-Apr-22 11:19am View
   
If you want to comment on a solution then use the "Have a Question or Comment?" next to it - the member will be notified that you are trying to respond
CHill60 12-Apr-22 13:53pm View
   
There probably is but you are not explaining the requirement particularly well. Are you saying that if the total of the bonus column across all rows is negative then set all negative values to 0 otherwise leave them as they are?