15,882,152 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by _Asif_ (Top 200 by date)
_Asif_
28-Feb-24 6:17am
View
Yes! this should be the issue. Correctly pointed. You should move your comments as Solution
_Asif_
21-Feb-24 4:39am
View
+5 for identifying the issue without any hint in Question
_Asif_
15-Feb-24 4:07am
View
+5. Yes, this can be done through Union as well, but I have a habit of using Union All because in my experience we generally get duplicates this way or that way. In the end, you were right about pathetic database design, seems developers no longer care about design. My habit is to help the OP in his circumstances without changing anything significant, this way he can understand better, theirby getting problem solutions quickly.
_Asif_
6-Feb-24 1:11am
View
It does not add up, where is your Lookup class used? what is Test.IsKeyWord?
_Asif_
6-Mar-23 1:02am
View
Why don't you look at server-side pagination? 700K rows is a big number and may cause performance issues at every level. As per industry practices for all such cases, we usually do pagination.
_Asif_
10-Feb-23 10:56am
View
The updated solution, thanks anyway. I re-read the question and got what you meant. Thanks anyway
_Asif_
2-Feb-23 2:23am
View
Yes in software terms everything is possible. My suggestions to you are
1. Your problem is not new instead it's an everyday problem for all online stores. It would be best if you studied how they have resolved this issue carefully.
2. Once you studied the other business models you may reach to an alternative solution compared to the one you suggested in your question.
3. If you still think that your suggested solution is best then you should write a document explaining the requirements end to end and float this document to any freelancer websites and you will start receiving Quotes.
Hopefully, the above approach should sort you out.
Thanks.
_Asif_
30-Nov-22 7:52am
View
Please provide table structure along with sample data to investigate further. You should also provide sample output as well for validating the solution
_Asif_
16-Mar-22 10:01am
View
Should not the output for mary be like
mary august 5 instead of mary may 5?
_Asif_
16-Mar-22 9:59am
View
Output does not match with OPs desired Output
_Asif_
7-Mar-22 7:51am
View
Below is the actual message (hiding customer details), the channel received from Middleware.
000187UNISON2|20|xxUserid|0210|20210605120248|06|CRM|4200000000001|115|20210605|0000001|000013|00000000000|00|1|Customer Name|00000000000001|0047|XXXXXXX|PKR||000000000000001|A|30|20|1|
As you can see the 5th Element is transaction date time. This received message goes through multiple stages, but the very first step the channel does
is to store this message in a table for Audit / Compliance purpose so that in case of investigation the channel precisely know what it has received from
Middleware. On later stages, we do parse the message and store it as per their data types.
There is another aspect that we should not understimate, and that is performance. Our Middleware processes 5K Transactions per second, and for that speed everything matters.
From the Question Perspective, what information are we getting.
1. This is a shopping cart kind of application
2. This application is already in production because OP got a "situation" where date is getting updated and that daily sales report is being generated for quite some time
3. The table name suggests it is some intermidiate table generated by backend process (Probably some DB Job) for daily reporting purpose
4. The report in question is not an automated report
5. This shopping cart application is developed by a novice software engineer.
6. It seems that a new requirement in terms of filter have been requested by Business team and this developer (OP) is working on this report filter.
From all above undestanding (for myself only) i have resolved his issue by providing him a solution for his immidiate problem.
P.S:
You all are free to downvote as many time as you want :) Thats not my concern. I am here to learn and to share the knowledge I have.
_Asif_
7-Mar-22 6:58am
View
You are right, This is new to me. Logically it does not make sense.
+5
_Asif_
7-Mar-22 6:10am
View
what do you think it should print?
_Asif_
7-Mar-22 3:32am
View
+5
_Asif_
4-Mar-22 8:12am
View
My vote of 1:
In significant number of cases, we as developer when join a company usually work in an environment where application is already in Production, used by thousands of users. In these legacy systems, developer usually inherits database design issues present in Production and for a number of reasons, correcting these design issues
requires deep product understanding, and most importantly impact analysis is required if there are third party APIs doing operations over these data.
Apart from that there are legit cases where dates do come as string and stored as string. For example in financial domain dates comes from host/middleware as string and stored as string in Audit Tables as per standard message format.
_Asif_
4-Mar-22 0:53am
View
Ok,
I assume you can track how many search/booked calls each IIS is doing. You need to do an analysis on per hour basis in the following manner. This should give you ideas what gets wrong.
|----------------------------------------------------------|-----------------------------------------------------------|
|------- Past Event When everything works fine -------|-------- Present Event: When L2B gets reduced --------|
| IIS | Search | Search Exec | Book | Book Exec | IIS | Search | Search Exec | Book | Book Exec ---|
| NO | Count | Exec Time Avg | Count| Exec Time Avg| NO | Count | Exec Time Avg | Count| Exec Time Avg|
|----------------------------------------------------------|-----------------------------------------------------------|
_Asif_
3-Mar-22 10:00am
View
Look to book seems a business term (not a technical term) that should vary as per your understanding that mobile UI is not that friendly compared to Desktop ( Web-based, I assume).
From the technical perspective, I like to know how many HTTP calls are landing on both IIS. my gut feeling is that round-robin is not working accurately and one IIS getting twice calls compared to other IIS.
Also check this https://support.citrix.com/article/CTX120542
_Asif_
3-Mar-22 3:01am
View
as everyone mentioned "a5" is not double type.
"5" -> 5.00 because 5 as string can be converted into double as 5.00
But how "a" in "a5" will be converted into double?
_Asif_
1-Mar-22 1:50am
View
Thanks
_Asif_
26-Feb-22 13:44pm
View
How difficult it would be to modify the query to use avg() function if you have understood the solution.
_Asif_
25-Feb-22 5:15am
View
it would have been much easier for us to solve this issue if you have provided sample data along with the expected result.
_Asif_
25-Feb-22 5:09am
View
you need to share your usersTbL table structure
_Asif_
24-Feb-22 2:44am
View
Can you share your JSON data. Your question is not clear enough.
_Asif_
22-Feb-22 3:36am
View
why not System.Threading.Thread.Sleep(5000);?
_Asif_
22-Feb-22 3:33am
View
where is BookingEntity object? You need to show your complete code
_Asif_
22-Feb-22 3:23am
View
+5
_Asif_
21-Feb-22 7:11am
View
You need to check whether file is present at $MYSQLSERVER/home/mohitlakhwani/Desktop/Photos location
_Asif_
21-Feb-22 6:28am
View
How about this?
DECLARE @TBL TABLE
(
RESERVATION_ID INT,
START_DATE DATETIME,
END_DATE DATETIME,
ROOM_ID INT
)
INSERT INTO @TBL
SELECT 1, '2016-01-01', '2016-01-03', 1
UNION ALL
SELECT 2, '2016-01-01', '2016-01-03', 2
UNION ALL
SELECT 3, '2016-01-02', '2016-01-02', 3
UNION ALL
SELECT 4, '2016-02-05', '2016-02-08', 1
UNION ALL
SELECT 5, '2016-02-25', '2016-03-01', 2
UNION ALL
SELECT 6, '2016-02-26', '2016-03-02', 1
UNION ALL
SELECT 7, '2016-03-01', '2016-03-03', 3
UNION ALL
SELECT 1, '2015-12-29', '2016-01-02', 4
UNION ALL
SELECT 1, '2015-01-01', '2016-01-04', 5
DECLARE @RNewSTartDate DATETIME = '2016-01-01'
DECLARE @RNewEndDate DATETIME = '2016-01-04'
select distinct ROOM_ID
from @TBL
where NOT @RNewSTartDate BETWEEN START_DATE AND END_DATE
AND NOT @RNewEndDate BETWEEN START_DATE AND END_DATE
AND NOT @RNewSTartDate >= START_DATE AND @RNewEndDate <= END_DATE
_Asif_
21-Feb-22 5:34am
View
+5
_Asif_
18-Feb-22 7:56am
View
On windows spaces between file names and folder names do create problems. For this particular problem, the application is not able to find the file and the most probable cause is space.
https://stackoverflow.com/questions/43510438/how-to-run-an-executable-that-contains-a-space-in-path-from-command-line-on-wind
_Asif_
18-Feb-22 6:33am
View
hmmm, acknowledged!
I usually test code online when I get the time, otherwise use what is present in the question and add the knowledge I have :)
But thanks anyway.
_Asif_
18-Feb-22 0:39am
View
true
_Asif_
18-Feb-22 0:38am
View
+5
_Asif_
10-Feb-22 0:20am
View
The error "Column Name or Number of Supplied values do not match table definition" is pretty straight forward. It simply means you have provided let's say 50 field names but you have provided 49 or 51 field values or provided field names do not match any fields in table. I don't think decimal/comma is an issue here because decimal/comma issue cause a different error.
Check your Insert SQL and see how many fields name and values have been passed.
_Asif_
9-Feb-22 8:36am
View
Have you understood the Question completely?
_Asif_
3-Feb-22 5:09am
View
Excellent!
_Asif_
2-Feb-22 6:37am
View
Your code have garbages, forexample what is [="" void="" payroll="" ::display_info()]?
_Asif_
1-Feb-22 5:46am
View
Well this is not self join and secondly why do you think the approach is wrong?
_Asif_
31-Jan-22 2:04am
View
There are entire books, written on OOP, and you want us to explain it to you in a paragraph? Secondly, who has written the above code? Have you copy-pasted it from somewhere?
_Asif_
29-Jan-22 9:12am
View
5+
_Asif_
29-Jan-22 8:35am
View
By the way your pattern is not pyramid!
_Asif_
29-Jan-22 8:24am
View
Memory are far more complex then what it seems. For a quick start you can try this:
var gcMemoryInfo = GC.GetGCMemoryInfo();
var installedMemory = gcMemoryInfo.TotalAvailableMemoryBytes;
// it will give the size of memory in MB
var physicalMemory = (double)installedMemory / 1048576.0;
For my laptop it is returing 16 GB, but you have to understand that this 16 GB is not available to your application.
I thought of writing a bit detail over memory but I found this great article that explain Memory in great detail.
https://www.codeproject.com/Articles/483475/Memory-Limits-in-a-NET-Process
_Asif_
28-Jan-22 9:11am
View
Acknowledged! I will update as soon as I get time
_Asif_
28-Jan-22 9:10am
View
Deleted
Acknowledged! I will update as soon as I get time
_Asif_
28-Jan-22 7:31am
View
what is abal++?
_Asif_
28-Jan-22 1:11am
View
But why do you even need to transform it in Assembly in the first place?
_Asif_
24-Jan-22 1:51am
View
Should not this be
$data['user_type'] => $data['$user_type'] and
$data['user_id_url'] => $data['$user_id_url'] ?
_Asif_
24-Jan-22 1:38am
View
Deleted
It seems that you have missed the con2.commit()
_Asif_
19-Jan-22 7:48am
View
yes, put new Question so that every body can look and respond
_Asif_
13-Jan-22 10:24am
View
Its not possible that 33900 rows cause SQL Server to go nuts. There must be some level of locks present that caused this issue. You need to Re Start SQL Server services and try executing the select query again
_Asif_
13-Jan-22 9:13am
View
How many rows present in this table? And share the estimated execution Plan of the select query.
_Asif_
12-Jan-22 6:45am
View
Share your SQL Server query
_Asif_
12-Jan-22 6:04am
View
+5
_Asif_
12-Jan-22 3:52am
View
You Win :)
_Asif_
12-Jan-22 3:19am
View
My 2 Cents,
- why put a formula in cell B3 and not B2 (I guess you are assuming that there is a header line)
[Asif] You are absolutely right. CSV usually contains headers
- why is that formula referring to the previous row
[Asif] OP's "Blah Blah" is just an example, in real-world this constant text would definitely have meaning. Instead of hardcoding this text on each row, why not dedicate a row/column for this hard-coded text and reference it in all subsequent calls. Hence $A$1 is used. Secondly, if OP wants to change this constant text then he needs to change only once, the rest automatically gets updated.
- why use & " " & A2 when you can just add a space to the cell.
[Asif] Please refer to 2nd Point for The underlying reason
- Why use that extra row at all when you could have just used = "blah blah " & A2
[Asif] The reason for that extra row has been explained in the 2nd Point. Hard Coding is bad, bad, and bad
- Why copy to the entire column when you only need to go to row 100,000
[Asif] I meant the same, the entire column means from B3 till B100000
- Why paste into a new sheet when you can just paste over the existing one
[Asif] It's always good to have a rollback strategy. The second Sheet idea is to preserve the original data so that we can go back to the original data if something goes wrong.
_Asif_
11-Jan-22 9:35am
View
DELETE CASCADE is the alternative way to delete child table tuples as well if parent tuple gets deleted although not recommended at all in almost all scenarios.
Check this link: https://www.sqlshack.com/delete-cascade-and-update-cascade-in-sql-server-foreign-key/
_Asif_
11-Jan-22 9:26am
View
Thanks. If I remember correctly we could have upvoted the comments previously, now we can't?
_Asif_
11-Jan-22 9:24am
View
Thanks for extending Solution 2 :) However, solution 2 should not take more than 2 minutes if one is fluent in Excel
_Asif_
11-Jan-22 9:18am
View
I don't think type is an issue here, Check this link. https://stackoverflow.com/questions/53984800/how-to-encrypt-and-decrypt-integer-data-type-column-in-sql-server-using-symmetri
_Asif_
10-Jan-22 0:24am
View
We have given you a direction to start. All you need to do now is to do some experiment.
_Asif_
7-Jan-22 0:39am
View
have you tried setting admin credentials of the stated windows service -> Services -> My Service -> Properties -> Log On Tab?
_Asif_
7-Jan-22 0:31am
View
Where have you been stuck> what error you are getting?
_Asif_
6-Jan-22 8:36am
View
Your update seems wrong as you are setting id_per_before column but in query you are updating id_before column. The errors seems straight forward, which is foreign key violation.
A simple way to debug is to open SQL Profiler and try tracing this update and you will exactly know what update is executing.
_Asif_
6-Jan-22 7:58am
View
OP can use the vulnerability part solution from OG's solution. My solution is usually direct and concise.
_Asif_
6-Jan-22 2:54am
View
What is the final query you getting?
try executing the same query on MS Access query window. May be your date settings are different. it could be mm/dd/yy instead of dd/mm/yy
_Asif_
4-Jan-22 5:02am
View
Table scanning is not the problem here, check the cost which is 0%. The problem is sorting which is 72% of the cost.
_Asif_
4-Jan-22 3:37am
View
IFNULL would replace null with 0 for both left and right sides, which leads to 0 = 0, which is true hence null rows would get returned in the resultset.
_Asif_
3-Jan-22 8:46am
View
Can you share a sample call to SetPrice? This would help us understand what value are you passing in Currency parameter?
_Asif_
3-Jan-22 7:40am
View
thanks
_Asif_
22-Jan-20 6:37am
View
You probably need to give full access rights to IIS_IUSRS User
_Asif_
22-Jan-20 5:52am
View
MySQL version added
_Asif_
22-Jan-20 3:10am
View
how dificult it would be to change it to mysql?
_Asif_
22-Jan-20 2:40am
View
DECLARE @OrderType VARCHAR(MAX) = 'AE-Return'
IF @OrderType = 'Success'
Select Revenue - Cost From ERP_Source_Table
ELSE IF CHARINDEX ('Return',@OrderType) > 0
Select Revenue * -1 , Cost * -1 ,Sales_Man,Order_Date,Order_Type From ERP_Source_Table
ELSE
Select * from ERP_Source_Table
To be precise!
_Asif_
21-Jan-20 2:40am
View
Why can't you try this?
https://stackoverflow.com/questions/13831472/using-a-variable-in-openrowset-query
_Asif_
26-Oct-18 0:53am
View
You should try this
xcopy /s /i /y %~dp0\..\windows\Resources %~dp0\..\..\build\windows\x64\%value%\Resources
_Asif_
25-Oct-18 0:49am
View
Show us the code you have tried, it seems you are asking us to do your homework :)
_Asif_
17-Apr-18 3:04am
View
It seems that you have missed a single quotation here "RAISE_APPLICATION_ERROR (-20325, 'May not add a record with both payment and charge information.')"
_Asif_
9-May-17 3:09am
View
hoping you have understood by yourself why its a syntax error. Anyway to fix it you need to look at following Tip
http://stackoverflow.com/questions/3735152/most-succinct-way-to-transform-a-csv-string-to-an-table-in-tsql
Your SP need to be altered to use above Tip, similar to something like this
select FId,DataTypeName from tbl_fieldname T
INNER JOIN dbo.Split(@dataval, ',') M ON T.DataTypeName = M.items
_Asif_
9-May-17 2:40am
View
SPs need to be test separately, usually using SQL Server Management Studio. For example a test script could be like.
DECLARE @dataval VARCHAR(200)
SELECT @dataval = 'varchar';
EXEC datatype_Details @Dataval;
And check whether SP is working as per requirement. If not then fix the SP.
_Asif_
9-May-17 2:30am
View
What exactly you mean when you say you can't find way to encrypt hosting information?
_Asif_
9-May-17 2:26am
View
Share SP test script.
_Asif_
9-May-17 2:19am
View
You need to share your SP code as well
_Asif_
12-Apr-17 2:44am
View
Views are accessed as tables (they don't have specialize syntax) and correct syntax would be like
SELECT * FROM client_allergies_nondrug. That is :
.CommandText = "SELECT * FROM client_allergies_nondrug";
_Asif_
28-Mar-17 1:51am
View
Why can't you have a single EXE to perform for all customers?
_Asif_
21-Mar-17 6:59am
View
I am more interested in knowing what triggered the desire behavior
_Asif_
6-Mar-17 2:55am
View
can you share your table structure and sample data?
_Asif_
19-Aug-16 7:19am
View
This link suggest a workaround. https://social.msdn.microsoft.com/Forums/vstudio/en-US/7be543f0-b9d8-49e4-be4a-4c104ecfa139/length-property-of-fileinfo-class-returns-zero-size-when-the-file-coping?forum=netfxbcl
_Asif_
11-Feb-16 5:21am
View
Can you share the results of below two queries
select TransactionID, ReplyID from TblTransactions where TransactionID in ('TN160200000011', 'TN160200000012', 'TN160200000013');
select VehicleID,ReplyID from TblConfirmedVehicleMap where VehicleID in (1, 2, 3);
_Asif_
11-Feb-16 2:44am
View
seems like you are missing a join condition. Can you share the structure of TblTransactions and TblConfirmedVehicleMap
_Asif_
9-Feb-16 4:45am
View
Try responding following queries :|
* This SQL Code is running fine on MS SQL Server?
* If yes then can you share DateBackBone(Date1, Date2) code here? you can view this code by executing below query in SQL Window
sp_helptext 'dbo.DateBackbone'
_Asif_
9-Feb-16 4:31am
View
it's highly uncertain that people will understand your roman Urdu here at CP, try using google translate for Urdu To english translation and update your question using Improve Question link
_Asif_
9-Feb-16 4:26am
View
DateBackbone is not part of MSSQL Server, its a user defined function. Share this UDF code of this function and what have you tried by the way?
_Asif_
8-Feb-16 3:26am
View
"How should I get the result with out any logic" Can't understand what you meant here!
_Asif_
4-Feb-16 4:37am
View
how you are connecting? Using SQL Server Management Studio -> Connect -> Database Engine -> Server Name -> IP Address?
_Asif_
4-Feb-16 4:33am
View
can you share your bcp command which you are using to export
_Asif_
4-Feb-16 4:28am
View
what is it so necessary to export in the .xls, .xlsx formats? .CSV is suffcient as it can be open in excel easily
_Asif_
4-Feb-16 4:23am
View
so how can we turn this unfortunate event to fortune? :)
_Asif_
4-Feb-16 2:44am
View
you have installed sql server 2012 on windows 2012 server and windows 7 workstation and after this you don't know how to connect to local database present on windows 7 work station and databases present on windows server 2012. is that right?
_Asif_
2-Feb-16 6:38am
View
share, what have you done so far
_Asif_
2-Feb-16 6:16am
View
Try readin this "http://stackoverflow.com/questions/9378313/display-new-mail-icon-in-windows-taskbar-using-vbscript", its almost identical of what you are doing and it works
_Asif_
2-Feb-16 5:13am
View
there nothing seems to be wrong at line 1. can you show it here what your line 1 is
_Asif_
2-Feb-16 5:13am
View
Deleted
there nothing seems to be wrong at line 1. can you show it here what your line 1 is
_Asif_
2-Feb-16 4:41am
View
Try this: http://stackoverflow.com/questions/2023766/an-attempt-was-made-to-load-a-program-with-an-incorrect-format-even-when-the-p
_Asif_
1-Feb-16 1:15am
View
you need to sanitize your input parameters
_Asif_
1-Feb-16 1:13am
View
did you google?
_Asif_
29-Jan-16 5:09am
View
if you have a fieled updatedOn which is more reliable then you can also order by UpdatedOn desc as well
_Asif_
29-Jan-16 3:04am
View
You have a startdate column, why can't you try Order By c.StartDate desc?
_Asif_
29-Jan-16 2:02am
View
what do you mean by "latest" one here?
_Asif_
29-Jan-16 1:59am
View
can you share the results of these queries.
1. select distinct asset_number from SAMPLING
2. select distinct ASSET_NUMBER from scanitem
_Asif_
29-Jan-16 0:28am
View
please share your employee xml schema
_Asif_
28-Jan-16 2:17am
View
Quick response: "https://www.google.com.pk/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=email+id+validation+in+sql+server"
_Asif_
28-Jan-16 2:14am
View
Can't read your mind! Wish, i could have a telepathic abilities :)
_Asif_
28-Jan-16 1:52am
View
Your code seems Ok, are you correctly executing it?
_Asif_
28-Jan-16 1:28am
View
Another approach might be to do the changes at database level, like creating a Stored Procedure in which you can use SELECT INTO clause that can create new table with new columns as well in 1 go
_Asif_
27-Jan-16 23:37pm
View
I have successfully executed a tweaked version of urs and its working fine.
Create table #temp1 (
invoicenumber int,
store varchar(255),
purchasedate datetime,
itemtype varchar(255),
totalprice money
)
Create table #temp2 (
invoicenumber int,
amount money
)
Insert INTO #temp1
SELECT 1,'a', getdate(), 'b', 100
UNION ALL
SELECT 2,'A', getdate(), 'b', 101
Insert INTO #temp2
Select invoicenumber, sum(totalprice)
From #temp1
Group by invoicenumber
select * from #temp2
_Asif_
27-Jan-16 7:56am
View
It does not seem to have any problem, at which line you get this error
_Asif_
27-Jan-16 3:36am
View
your given links are block, you need to share it in your question. Follow Improve Question link
_Asif_
26-Jan-16 2:41am
View
where is that select query? Can't read your mind... right? :)
_Asif_
26-Jan-16 1:56am
View
There are no shortcuts in learning, you have to do the hard way!
_Asif_
26-Jan-16 1:53am
View
:D
_Asif_
25-Jan-16 8:49am
View
what do you mean exactly when you say "but I don`t know which file i have to send and how can i send this code to the android."
_Asif_
25-Jan-16 8:37am
View
Solutions are not meant for adding Comments, you can improve your solution 1 by selection mprove Solution link. Do delete this solution 2.
_Asif_
25-Jan-16 8:17am
View
What is the result of this query "SELECT kpi.FK_Transporter ,kpi.`Month`, AVG(kpi.OnTimeDelivery) as avg_rate
FROM primarykpi as kpi,transporter as t
WHERE kpi.FK_Transporter=t.Id and YEAR(kpi.`Month`)=2016
GROUP BY FK_Transporter, MONTH(kpi.Month)"
_Asif_
25-Jan-16 8:14am
View
you need to put your source code and xml here!
_Asif_
22-Jan-16 8:12am
View
And what have you tried?
_Asif_
22-Jan-16 7:35am
View
That is great! Now what formula you have regarding OpnStock and Item Purchase and Item sales?
_Asif_
22-Jan-16 5:33am
View
Do you know the business behind OpeningStock/Purchases/Sales/ClosingStock?
_Asif_
22-Jan-16 3:12am
View
Its not the right way to add comments, solution is meant for solution :) Please remove it and add the content in the question by clicking Improve Question button
_Asif_
21-Jan-16 5:17am
View
+5
_Asif_
21-Jan-16 3:15am
View
why you want to parse html at database level in the first place?
_Asif_
20-Jan-16 8:21am
View
Try running it using administrative privileges.
_Asif_
20-Jan-16 7:11am
View
how you executing it?
_Asif_
20-Jan-16 3:12am
View
What is the actual error you are getting? You have not mentioned the problem you are getting while inserting?
_Asif_
20-Jan-16 0:56am
View
Its pretty easy, check this http://stackoverflow.com/questions/8299069/using-xpath-to-parse-an-xml-document
_Asif_
20-Jan-16 0:29am
View
This is the solution!
_Asif_
20-Jan-16 0:29am
View
Why are you using XML in the first place if all you have to do is get the values of text boxes?
_Asif_
19-Jan-16 2:53am
View
you now have a Solution
_Asif_
19-Jan-16 2:51am
View
You have responded to 1.5 year old question, OP must have got the resolution by now :)
_Asif_
19-Jan-16 2:42am
View
What have you tried?
_Asif_
19-Jan-16 2:32am
View
The correct way of doing this is to use XML parser. I wonder why are you not using it. Did you look at this http://stackoverflow.com/questions/14153988/how-should-i-parse-this-xml-string-in-python?
_Asif_
19-Jan-16 2:11am
View
How do vehicle.Insert() know that it has to call sp_VehicleInfo stored procedure? Where have you defined this? And there are problems in your SP as you are using the SP name in your INSERT INTO sp_VehicleInfo query
_Asif_
18-Jan-16 7:57am
View
+5
_Asif_
18-Jan-16 7:57am
View
Tested version of your solution.
DECLARE @EMP TABLE
(
EmpId int,
Name varchar(10)
)
;
DECLARE @Advance TABLE
(
advanceId int,
empId int,
AdvanceDate DateTime
)
;
INSERT INTO @EMP (EmpId, Name)
SELECT 1, 'A'
UNION ALL
SELECT 2, 'B'
UNION ALL
SELECT 3, 'C'
;
INSERT INTO @Advance (advanceId, empId, AdvanceDate)
SELECT 1, 1, '01-Jan-2015'
UNION ALL
SELECT 1, 1, '01-Jan-2016'
UNION ALL
SELECT 3, 1, '01-Feb-2016'
UNION ALL
SELECT 4, 2, '01-Jan-2016'
;
with AdvanceCnt as (
select
EmpId,
AdvanceDate,
ROW_NUMBER() over(partition by EmpId order by AdvanceDate) as rowid
from @Advance
WHERE AdvanceDate between '01-Jun-2015' AND '31-Jul-2016'
)
SELECT E.EMPID,
E.NAME, AC1.AdvanceDate as AdvanceDate1, AC2.AdvanceDate as AdvanceDate2
from @EMP E
LEFT OUTER JOIN AdvanceCnt AC1 on E.EMPID = AC1.EMPID AND AC1.ROWID = 1
LEFT OUTER JOIN AdvanceCnt AC2 on E.EMPID = AC2.EMPID AND AC2.ROWID = 2
_Asif_
18-Jan-16 6:37am
View
Yes, you can do that as well, to me group by let you add more filters if needed later, kind of more adaptive (all you need to add is having filters)
_Asif_
18-Jan-16 3:51am
View
You are not thinking! Points to ponder!
* Where have you declare the @rn? what is its type?
* SET @rn=0; SELECT @rn = @rn + 1 will always return 1! Why?
* Why have not you used AUTO_INCREMENT?
_Asif_
18-Jan-16 3:36am
View
Would not @rn=0; Select @rn+1 will always turn out 1 also?
_Asif_
18-Jan-16 3:29am
View
Try Debugging the code by using this query. Select 1 As `Sno`, perName As `Name`, speDesignation As `Designation`, speId As `SysId` From main.SupplierPeople Inner Join main.people On spePerId = perId Where speSupId = pSupplierId
_Asif_
18-Jan-16 2:36am
View
+5ed
_Asif_
18-Jan-16 2:31am
View
Let's just stick to your current problem now, we will look at your 100+ rate codes later, did you try executing the above query?
_Asif_
15-Jan-16 8:25am
View
have you read CTE (Common Table Expression)? Your problem is recursive by nature hence can be easily solved by a CTE. Do google like "SQL CTE sample", then try writing a CTE, once you have started let us know where you have stuck
_Asif_
15-Jan-16 8:08am
View
write your sql here so we could fix it
_Asif_
15-Jan-16 8:01am
View
Its homework and we don't do homework! Sorry
What have you tried by the way?
_Asif_
15-Jan-16 7:43am
View
have you debug it?
_Asif_
15-Jan-16 5:38am
View
You probably have missed a ';' somewhere in your code.
_Asif_
15-Jan-16 2:47am
View
where is the question?
_Asif_
14-Jan-16 6:40am
View
You now need to check your update query, one way of debugging is to change your update to SELECT and see your return result conforms to what you expect, like for example check below query and analyse what is wrong?
SELECT School.DateTravelPlanSubmitted, SchoolSignDate.SignoffSchoolDateMax
FROM School
INNER JOIN SignOff ON School.SchoolID = SignOff.SchoolID
inner join (select SignOff.SchoolID,SignoffSchoolDateMax=max(SignOff.SignedOffBySchoolDate)
from SignOff
inner join School on School.SchoolID=SignOff.SchoolID
group by SignOff.SchoolID)
SchoolSignDate on SchoolSignDate.SchoolID=School.SchoolID
_Asif_
14-Jan-16 6:35am
View
+5ed
_Asif_
14-Jan-16 5:11am
View
what have you tried?
_Asif_
14-Jan-16 3:19am
View
This is homework right?
_Asif_
14-Jan-16 3:06am
View
Can you share your rows that has been duplicated with the original one?
_Asif_
13-Jan-16 6:45am
View
You need to use Question and Comment button to add comments instead of adding comments as solution. Please remove this solution
_Asif_
13-Jan-16 6:42am
View
+5
_Asif_
13-Jan-16 3:28am
View
:)
_Asif_
12-Jan-16 1:27am
View
The Table list you are seeing @SQLDeveloper are tables that are present in the Oracle Database regardless of who has created what. SQLDeveloper or no other tool can differentiate table owners the way you want.
Since you have created 10 tables then how hard it is to remember all?
_Asif_
7-Jan-16 7:05am
View
Yes, that's true, this is the solution, post it as solution
_Asif_
7-Jan-16 5:18am
View
show your code
_Asif_
7-Jan-16 3:40am
View
I don't know your business case but usually Transactions do not get purge because of strict regulatory archiving policy. why don't you archive transactions for a day and get the count from archived table/repository.
_Asif_
7-Jan-16 3:09am
View
Are you purging records or archiving ? for every 30 mins
_Asif_
7-Jan-16 2:35am
View
Have you updated this,
string ozSURL = "url_to_be_provided";
_Asif_
7-Jan-16 2:03am
View
You are trying to build a Windows Explorer Extension?
_Asif_
7-Jan-16 1:57am
View
Told you already, its a quick solution, correct way would be to identify why your Category xml has duplicate entry in the first place.
_Asif_
6-Jan-16 8:05am
View
I have modified the solution, check again
_Asif_
6-Jan-16 6:06am
View
ok, so if i understood you correctly you want this
and (GradutionYear =2016 and isnumeric(GradutionYear)=1 and GradutionYear<>0 ) and (Rank in(53322,53323,53324,53325,53327,53328,53329,53330,158676,158677,158678,158679)) to be this
and (GradutionYear =2016 and isnumeric(GradutionYear)=1 and GradutionYear<>0 ) and (Rank in('53322','53323','53324','53325','53327','53328','53329','53330','158676','158677','158678','158679')) for all rows...right?
_Asif_
6-Jan-16 5:59am
View
What is a POPUP? do you mean server will broadcast a message to all connected clients and this message will show as a popup over desktop of clients?
_Asif_
6-Jan-16 5:39am
View
ic, you need to improve your question by adding all these information, secondly what about comment filter? what is the role of comment filter in your query?
_Asif_
6-Jan-16 5:19am
View
show us 10 sample rows and the desired result in tabular form
_Asif_
6-Jan-16 5:10am
View
instead of adding new solution you should update your first solution by using Improve SOlution button
_Asif_
6-Jan-16 5:06am
View
none of these values will get update because none of the columns contains and ' and (Rank in(1321619,1232323,123131)) and (Comment like '%2016%')'... right?
put rows that have your values that you like to change
_Asif_
6-Jan-16 4:49am
View
Can you put 10 rows here to have an idea what kind of data you have in column
_Asif_
6-Jan-16 4:40am
View
how did you assume that i update for a single row? did you try adding multiple rows in @TBL and see what is going on?
_Asif_
5-Jan-16 6:57am
View
:D
_Asif_
5-Jan-16 6:47am
View
why are you continuously clicking the exe file? stop continuous click and problem might go away :)
_Asif_
5-Jan-16 5:11am
View
Can you elevate the access right of the application to administrator and execute the application again and see does this solve your problem?
_Asif_
1-Jan-16 6:58am
View
what error are you getting ? what is the datatype of itemcode field?
_Asif_
31-Dec-15 3:11am
View
+5
_Asif_
30-Dec-15 7:25am
View
Isn't the error is clear? SQL Serevr is not able to understand what is '06.06.2015'. change it to '06-Jun-2015' and test again.
_Asif_
29-Dec-15 0:52am
View
Did you look at SQL Server Replication?
_Asif_
19-Dec-15 5:10am
View
Which version of Visual Studio are you using for setup building?
_Asif_
19-Dec-15 2:30am
View
It means that one of your column have received data larger than their allocated space.
You need to extend your column sizes and try again. Check which column have got broken
_Asif_
19-Dec-15 2:12am
View
which error? Do remember, we can't read your screen, your hard disk, your mind. So help yourself by helping us
_Asif_
11-Dec-15 0:02am
View
ROFL :D
_Asif_
9-Dec-15 5:12am
View
What have you tried?
_Asif_
9-Dec-15 3:22am
View
Write the command that is generating this error!
_Asif_
8-Dec-15 6:44am
View
How about sharing your code with us so that we look whats getting wrong?
_Asif_
4-Dec-15 7:20am
View
Well you can easily find the issue by just dropping a break point over objMaintenane.Expenses.Add(i) line and debug it, check what insert query is generating to DB. This is a minute job and you can do it
_Asif_
4-Dec-15 7:09am
View
My guess is OP wants to build an application that automatically gets updated without giving a prompt to user. Some thing like Smart Client application that gets updated without given a notification to the user that a new version is present at server or i might be wrong totally :)
_Asif_
4-Dec-15 5:51am
View
You need to provide schema information, specially how you going to filter data based on date. Do you have created_on type of column n all tables?
_Asif_
4-Dec-15 3:59am
View
Have made changes to the solution. Try the new one
_Asif_
3-Dec-15 7:56am
View
You can do a loop over table, store the process_date in a variable @TABLENAME and then finally PRINT that variable as you are showing in ur comment :) though i can't comprehend what actually you are trying to acheive
_Asif_
3-Dec-15 3:46am
View
It seems like you are writing some ETL for BI analysis. Why can't you refresh your facttranemp by purging it entirely and regenerating on each day?
Show More