15,897,518 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 Advay Pandya (Top 67 by date)
Advay Pandya
22-Jul-17 7:22am
View
Hi Graeme,
Yes, me and my project partner are researching this since last 2 days.
We got few articles saying that object of "ClaimsPrincipal" class will work for our scenario. After implementing many google search I finally posted here.
Advay Pandya
10-Jun-16 5:33am
View
Reason for my vote of 2 \n There are lot more better way then this.
Advay Pandya
16-Feb-16 0:52am
View
@OriginalGriff, @Dave Kreskowiak. Can you please help ?
Advay Pandya
2-Sep-15 2:20am
View
Good information Andy... 5ed
Advay Pandya
28-Aug-15 7:11am
View
Do you want to convert table to XML in SQL ? Means do you have any tabular output and you want to show that in XML form ? Please clear the requirement.
Advay Pandya
28-Aug-15 5:25am
View
Do you want to know, where can we find the indexes in SQL server ?
Advay Pandya
26-Aug-15 7:44am
View
Welcome :)
Advay Pandya
26-Aug-15 7:26am
View
Always welcome. It happens in the coding world. We developers are not able to find small mistakes of their own code. :)
Advay Pandya
25-Aug-15 9:14am
View
Your question is not clear. Which kind of result you want ? Do you want to join rows/columns ? or you want the result in 2 different tables ?
Advay Pandya
25-Aug-15 5:35am
View
Please make sure the database of connection string and database that you are checking are same.
Advay Pandya
25-Aug-15 2:20am
View
Okay, You might get error on 1 or 2 attempts because I dont have DB structure so I am not able to run the query.
Please replace inner join part from below lines. I think now it will work.
INNER JOIN ( select CNTM_CONTACT_ID,max(CNTM_Active_Date) AS CNTM_Active_Date from CONTACT_MST_LOG b
) T ON CNTM.CNTM_Active_Date = T.CNTM_Active_Date AND CNTM.CNTM_CONTACT_ID = T.CNTM_CONTACT_ID
U can exclude the CNTM_CONTACT_ID condition if you don't need.
Please let me know if you are still facing issue.
Advay Pandya
24-Aug-15 9:08am
View
I have modified your query as per my understanding. I have removed the where condition of date and put a separate join. The reason of joining is to have multiple where condition with the table.
Please try below and please let me know if it will still not a working solution for you:
select CNTM.CNTM_CONTACT_ID,CNTM.CNTM_ISACTIVE,CNTM.CNTM_Active_Date as ActiveDate,
day(Convert(varchar, CNTM.CNTM_Active_Date ,110)) as ActiveDay,
month(Convert(varchar, CNTM.CNTM_Active_Date ,110)) as ActiveMonth,
year(Convert(varchar, CNTM.CNTM_Active_Date ,110)) as ActiveYear
from USER_MST inner join CONTACT_MST CNTM1 on USRM_CONTACTID=CNTM1.CNTM_CONTACT_ID
inner join USERROLEREL_DET on URRD_USER_ID=USRM_USER_ID inner join ROLE_MST on URRD_ROLE_ID=ROLM_ROLE_ID
inner join CONTACT_MST_LOG CNTM on CNTM1.CNTM_CONTACT_ID = CNTM.CNTM_CONTACT_ID
INNER JOIN ( select max(CNTM_Active_Date) AS CNTM_Active_Date from CONTACT_MST_LOG b
where CNTM.CNTM_CONTACT_ID = b.CNTM_CONTACT_ID ) T ON CNTM.CNTM_Active_Date = T.CNTM_Active_Date
where USRM_COMPANY_ID= '544' and ROLM_ROLE_ID = 9 AND CNTM.CNTM_ISACTIVE = 'Y'
group by CNTM.CNTM_Active_Date,CNTM.CNTM_CONTACT_ID,CNTM.CNTM_ISACTIVE,
day(Convert(varchar, CNTM.CNTM_Active_Date ,110)),
month(Convert(varchar, CNTM.CNTM_Active_Date ,110)),
year(Convert(varchar, CNTM.CNTM_Active_Date ,110))
Order by year(Convert(varchar, CNTM.CNTM_Active_Date ,110)) ,month(Convert(varchar, CNTM.CNTM_Active_Date ,110))
Advay Pandya
24-Aug-15 8:49am
View
I am still not clear about the latest active users. Does your query returns correct result for the today's date ? If yes then I can help you to make query result for all the days instead of single date.
Advay Pandya
24-Aug-15 8:08am
View
Thanks Maciej :)
Advay Pandya
21-Aug-15 10:17am
View
Ohh Sorry, It's my column name. Let me edit that. Please check now
Advay Pandya
17-Aug-15 4:02am
View
Welcome :) . Please ask me if you need any other help in this query.
Advay Pandya
17-Aug-15 3:32am
View
Yes, I got it. if "CommHeirID " is NULL in LEFT join and it is eliminated in the INNER join then it means row does not exixts in the table "UMTranImpoPendLog". So if the row does not exists then you should insert the new row instead of updating it. It returns NULL result because LEFT JOIN will bring you all the rows of left table, no matter row is exists or not in the right table. Please let me know if you have any concern or query on this.
Advay Pandya
17-Aug-15 2:19am
View
Do u want to update records those are there in "UMCommWithHeldLog" table, but not there in "UMTranImpoPendLog " table ? Something like this ?
Advay Pandya
17-Aug-15 1:22am
View
You seems still confuse. You are getting data from left join because the columns are there physically from the left table. So, you can update those records from left the table. But there is no data from right side table because of which you are getting NULL columns. So, you cant update those records. Please explain which kind of data you want to update, so we can find alternate solution.
Advay Pandya
14-Aug-15 4:56am
View
ya, but while inserting in the table or just fetching data using select statement ?
Advay Pandya
14-Aug-15 3:06am
View
Please provide some more details on this. Reset means when ? While inserting data or while fetching data? and what to do if the number exceeds 9999 for a month ?
Advay Pandya
13-Aug-15 9:46am
View
Yes, if there is no row then what will get updated ? Please share your issue in detail so I can suggest some alternate way....
Advay Pandya
13-Aug-15 5:29am
View
Great advise for 1.50..... 5ed
Advay Pandya
11-Aug-15 3:06am
View
Thanks Maciej.... :)
Advay Pandya
11-Aug-15 1:00am
View
Thanks... :)
Advay Pandya
10-Aug-15 6:11am
View
Please put some clarity in the question.
Advay Pandya
10-Aug-15 6:08am
View
Thanks Maciej :)
Advay Pandya
10-Aug-15 5:00am
View
yup. sure. It deserves....
Advay Pandya
10-Aug-15 3:57am
View
Nice article Maciej.... :)
Advay Pandya
10-Aug-15 2:37am
View
Welcome :)
Advay Pandya
10-Aug-15 1:53am
View
Can you please put some clarity in your question ? What is wrong in your result and what are you trying to achieve with this query ?
Advay Pandya
9-Jul-15 2:16am
View
Please re-format your query. It's really not readable properly.
Advay Pandya
7-Jul-15 2:53am
View
Hi, your question does not seem to be clear. Please improve your question by adding more details. So someone can provide you needed solution. Thanks...
Advay Pandya
24-Jun-15 7:18am
View
Hi. Do you know how to implement this P3P policy ?
Advay Pandya
3-Jun-15 2:04am
View
Always Welcome :)
Advay Pandya
1-Jun-15 5:04am
View
Please provide more information. In which line you are getting error. Or please share how did u initialized variables those are used.
Advay Pandya
1-Jun-15 2:13am
View
Please elaborate more on this.
Advay Pandya
1-Jun-15 1:53am
View
Hi, yes.. If you set trigger then no matter from where are you updating the table it will be reflected. Whenever your table is updated the trigger will fire and it will update another table accordingly. If you are updating the table using ASP.Net still the trigger will update another table automatically. Please let me know if you need more info on this.
Advay Pandya
1-Jun-15 1:53am
View
Deleted
Hi, yes.. If you set trigger then no matter from where are you updating the table it will be reflected. Whenever your table is updated the trigger will fire and it will update another table accordingly. If you are updating the table using ASP.Net still the trigger will update another table automatically. Please let me know if you need more info on this.
Advay Pandya
29-May-15 5:50am
View
always welcome :)
Advay Pandya
29-May-15 2:27am
View
Welcome. Your query is correct, but it may provide wrong result in the case of NULL value. Please check NULL values using your query. except keyword will also handle NULL value. Thanks..
Advay Pandya
28-May-15 9:55am
View
I have a query on this. You want to copy data from one to another table. So the data will be inserted every time ? or the data will be inserted and updated both based on situation ?
Advay Pandya
28-May-15 7:17am
View
If multiple value will return then you need to choose only one value. So, which value do you want to set as @TrID if you find multiple ? You cant choose multiple values in a variable.
Advay Pandya
28-May-15 6:56am
View
Thanks :)
Advay Pandya
27-May-15 9:52am
View
Always welcome :)
Advay Pandya
27-May-15 6:04am
View
Which problem are you facing ? I saw your new post. Please reply there so if possible I can help you quicker.
Advay Pandya
27-May-15 6:01am
View
Are you using any tool called "Zing Soft" ? I noticed that the path contains the directory of "ZingSoft".
Advay Pandya
27-May-15 5:52am
View
Hey, you posted this query on previous question right ? Didn't you get the solution ?
Advay Pandya
27-May-15 5:19am
View
Always Welcome :)
Advay Pandya
27-May-15 4:47am
View
if you are inserting in bulk then there is no room for error. If error will occur then none of the data will be inserted. If insertion is completed successfully then only way to verify data using except keyword. it will result all the missing data. If there are 100 rows needs to be inserted and only 80 are inserted then "except" will show you missing 20 rows. Got my point ?
Advay Pandya
27-May-15 3:00am
View
I have a query. The data are inserted in a loop or in bulk ? If the data are inserted in look, you can use try/catch block in SQL query and you can insert error log in a table from catch block. If the data is inserted in bulk then you will need to verify only using except keyword. Please let me know if you need more info or I am still missing something. :)
Advay Pandya
27-May-15 2:35am
View
Can you please try to avoid looping and insert bulk data ? Because only blocking thing in your query in terms of performance is while loop.
Advay Pandya
27-May-15 2:11am
View
Always welcome :)
Advay Pandya
26-May-15 6:30am
View
Please check the HTML and CSS using firebug tool. It is very tough to identify the issue only by viewing image file.
Advay Pandya
22-May-15 4:47am
View
Okay, It should work. It may be possible that there are few other filters in your query (Like where condition,Inner join etc.) Is it possible those condition filter out the data you need ? Can you please share some demo data with me, so I can check ?
Sometimes we are looking at one place and issue lies on another place..
Advay Pandya
19-May-15 1:08am
View
I am not sure about the relation between both the tables. Can you use join to fetch columns from both the tables ?
Please let me know if you have any concern or query on this.
Advay Pandya
18-Sep-14 7:00am
View
It's Forms authentication....
Advay Pandya
18-Sep-14 3:04am
View
I mean to say, If I run the system on browser of the Live server directly by taking the server on remote then it works. So I can guess it is working on the server only.So issue might be with IIS setting. Got my point ??
Advay Pandya
16-Sep-14 8:38am
View
@Suvabrata , I would like to share one point.. I notice that when I run this portal in the live server using remote connection, it works fine in all the versions of IE. So I can guess it is something related to IIS. What do you think ?
Advay Pandya
16-Sep-14 7:58am
View
no. I am using session only, not cookies.
Advay Pandya
16-Sep-14 7:45am
View
Ya, it's a publish version at server. Actually that should not be issue because the system is working fine in all other browsers.
Advay Pandya
16-Sep-14 7:25am
View
This portal contains VB and C# both kind of files in separate directories.
Is it something which may cause this issue ?
Advay Pandya
16-Sep-14 6:56am
View
@Suvabrata, thanks for providing this link... I saw this link earlier, but it's like to play with IIS settings. My portal is running live and feeling risky to do this kind of change. Looking for other solution. If I cant find any other then I will try this solution last. Do you know any way to get actual error message if any ? that will help me to investigate more on this.
Advay Pandya
16-Sep-14 6:21am
View
Suvabrata, it's a small portal application. It's working fine for all the browsers, but getting HTTP 500 error in the IE9 and older versions of IE. I am also not able to get the real error message. Is there any way to find real error ? I am not sure which code block should I send. Do you have any idea ?
Advay Pandya
3-Jul-12 7:25am
View
I have already keep this solution in my mind to store last visited page in session or cookies. But I am looking for other alternative. I am looking for default function or object. Session or cookies may affect performance of the application.
If you have any other alternative or any idea related to this then please share with me.
Advay Pandya
3-Jul-12 5:42am
View
Hi Amit,
Thanks for your suggestion.
I tried this solution from my end.
But , when user change url directly then all the dot net objects which are used to get previous page url are getting refreshed. And they returns NULL value. So in this case I am not able to get the previous page information.
Please advise if you have any other idea.
Thanks
Advay Pandya
Advay Pandya
3-Jul-12 5:39am
View
Hi Prasad,
Thanks for your solution.
But both links suggest to redirect page into login or some other AccessDenied page, I dont want to kill session or redirect user into any other page. I want user to stay in the same page.
ex. If user is in a.aspx page, and if they try to change url to b.aspx , then user should stay in a.aspx
When user change url directly then all the dot net objects which are used to get previous page url are getting refreshed. And they returns NULL value.
So how can I achieve this ?
Thanks
Advay Pandya
Show More