15,663,341 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 Python questions
View Javascript questions
View C++ questions
View Java 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 Shweta N Mishra (Top 200 by date)
Shweta N Mishra
12-Jul-16 6:46am
View
dynamic Pivot does not work until and unless you use dynamic query. i.e. you need to prepare a query string with dynamic columns and then execute it.
Shweta N Mishra
12-Feb-15 8:40am
View
What i crossed ?
did you tried the code
check this
Create table #Barcode(Barcode Varchar(100))
insert #Barcode select '2014-1024'
insert #Barcode select '2014-1025'
insert #Barcode select '2014-1026'
insert #Barcode select '2014-1027'
insert #Barcode select '2014-1028'
insert #Barcode select '2014-1030'
insert #Barcode select '2014-1031'
insert #Barcode select '2014-1029'
select
*
from #Barcode
where
Convert(int,Replace(barcode,'-',''))>=20141026
and Convert(int,Replace(barcode,'-',''))<=20141030
Shweta N Mishra
4-Feb-15 3:55am
View
What is the datatype of your columns in table
Shweta N Mishra
23-Jan-15 11:35am
View
explain the result you want with data and i guess you are missing a join on OrderDetailID
Shweta N Mishra
19-Jan-15 7:21am
View
what have you tried ?
Shweta N Mishra
6-Jan-15 4:44am
View
Thank you :)
Shweta N Mishra
6-Jan-15 3:43am
View
check your where condition, the issue must me in that.
columns which you are applying in where condition does not reflect in your result mention so its difficult to identify your issue.
Shweta N Mishra
6-Jan-15 3:38am
View
+5
Shweta N Mishra
2-Jan-15 6:50am
View
post your query.
Shweta N Mishra
22-Dec-14 9:53am
View
your question is not clear, what is the code you have return on a c# page, Are you using SSRS ?
Shweta N Mishra
19-Dec-14 7:24am
View
Deleted
:)
Shweta N Mishra
19-Dec-14 5:22am
View
code seems to be correct, Did you have passed correct studentId in parameter ?
Shweta N Mishra
18-Dec-14 3:30am
View
which columns are index and in what order ?
Shweta N Mishra
18-Dec-14 3:27am
View
you could replace the Default date while creating the Row_Number with lower date as below.
WITH CTE(RowNumber, Sequence, ID ,Test_BEGDT, Test_ENDDT, Test1_BEGDT, Test1_ENDDT ) AS
(
SELECT
ROW_NUMBER() OVER (PARTITION BY ID order by ID, TEST_BEGDT, Replace(TEST1_BEGDT,'Dec 31 9999','Jan 01 1900') desc) AS RowNumber,
ROW_NUMBER() over (PARTITION BY id order by id) as Sequence
, ID
, TEST_BEGDT
,TEST_ENDDT
, TEST1_BEGDT
, TEST1_ENDDT
FROM table1 tbl
)
delete from CTE where RowNumber > 1
Shweta N Mishra
17-Dec-14 9:12am
View
+5
Shweta N Mishra
17-Dec-14 9:11am
View
select @@identity in you SP where you are inserting the data
Shweta N Mishra
17-Dec-14 7:02am
View
whic line do you get error, where is your cast code applied ?
Shweta N Mishra
17-Dec-14 5:54am
View
Why dont you want to use JOIN?, Use where clause but this going backword in tech
Shweta N Mishra
16-Dec-14 3:44am
View
You need to create a Page Break group and apply the given expression, did you tried it ?
Shweta N Mishra
15-Dec-14 11:48am
View
does your table has proper indexes ?
How much records are there in table your are working with ?, Are there partition created ?
Shweta N Mishra
15-Dec-14 6:56am
View
i do not see your table which you are trying to post.
Use Improve question option and post your table data.
Shweta N Mishra
15-Dec-14 6:51am
View
select * from
(
select empName,Salary,Row_Number() Over ( order by salary desc ) as RowID
from empinfotable
) where RowID=5
above is a single statement
Shweta N Mishra
15-Dec-14 6:08am
View
thank you :)
Shweta N Mishra
15-Dec-14 6:06am
View
it would not work in sql 2008, You have to use other options as given earlier.
Shweta N Mishra
15-Dec-14 5:26am
View
select * from
(
select empName,Salary,Row_Number() Over ( order by salary desc ) as RowID
from empinfotable
) where RowID=5
which sql version you are using ?
you can try this also
SELECT empname,salary FROM Employees ORDER BY salary DESC OFFSET 4 ROWS FETCH NEXT 1 ROWS ONLY;
which works SQL server 2012 & above
check this link for more detail
http://technet.microsoft.com/en-us/library/gg699618%28v=sql.110%29.aspx
Shweta N Mishra
15-Dec-14 4:40am
View
thank you :)
Shweta N Mishra
15-Dec-14 4:18am
View
np :)
Shweta N Mishra
15-Dec-14 3:40am
View
you need to elaborate your question details a little more, Put your table sample record and expected result in you question too.
Shweta N Mishra
12-Dec-14 11:22am
View
what you have tried, put your code and data sample
Shweta N Mishra
12-Dec-14 8:28am
View
what if you enter 2 digit number, how you wanna add it
like this 1+2+3+4+25 or 1+2+3+4+2+5 ?
Shweta N Mishra
12-Dec-14 3:29am
View
what is the problem you are facing and on which line
Shweta N Mishra
12-Dec-14 3:29am
View
You should post your commments in question or on the ansers given by others, I you do not have the answer. Delete this other wise someone will report it "Not an Answer" and you will be downvoted for that.
Shweta N Mishra
12-Dec-14 3:25am
View
add more details, e.g. whats there in your textbox content and what values you want to store it in SQL
Shweta N Mishra
12-Dec-14 3:20am
View
I understand thats why said that its not advisible. :) and store it as date only.
Shweta N Mishra
11-Dec-14 4:11am
View
already asked at
http://www.codeproject.com/Questions/852271/how-to-create-index-in-stored-procedure?arn=9
Shweta N Mishra
11-Dec-14 3:43am
View
what is the issue you are facing
Shweta N Mishra
11-Dec-14 3:25am
View
Why you want to create inside in a SP, is it a temp table. even if its temp table then also syntax would be same as creating on normal physical table.
Shweta N Mishra
6-Dec-14 14:12pm
View
yup, I agree with Maciej . to do such there are many article and video tutorial available on google and youtube. search in them.
Shweta N Mishra
6-Dec-14 14:09pm
View
what did you ran which resulted this error
Shweta N Mishra
5-Dec-14 6:55am
View
so you are missing the file adovbs.inc.
download it and keept at refered location.
you can use this link http://support.web.com/vserver/ntguide/microsoft_adovbs_inc_file.htm
Shweta N Mishra
5-Dec-14 5:57am
View
did you tried anything ? It can be used same as we can use normal query or stored procedure in ASP.net.
Shweta N Mishra
5-Dec-14 4:15am
View
thank you.
Shweta N Mishra
5-Dec-14 3:52am
View
it works for me what you code you have written ?
Shweta N Mishra
5-Dec-14 3:42am
View
Are you getting any error, Program looks good.
Shweta N Mishra
5-Dec-14 3:28am
View
+5
Shweta N Mishra
4-Dec-14 9:03am
View
No.
Shweta N Mishra
4-Dec-14 8:28am
View
And whats bad about it ?
Do you warn points without helping ? i dont . and dont you see the comments after the user reply at the end.
Shweta N Mishra
2-Dec-14 3:30am
View
download a latest one try with that.
Shweta N Mishra
2-Dec-14 3:30am
View
may be you VLC player is corrupt.
Shweta N Mishra
2-Dec-14 3:28am
View
whats your code, put in here and which line does you get the error ?
Shweta N Mishra
2-Dec-14 3:26am
View
you should convert @IDvalue to nvarchar and then check.
Shweta N Mishra
2-Dec-14 3:25am
View
its their in solution with the code look up in existing solution.
Shweta N Mishra
1-Dec-14 11:08am
View
is this solution for the question http://www.codeproject.com/Questions/848587/SQL-Counting-Problem?arn=5, if yes then post it there and delete this. It does not seems to be a question.
Shweta N Mishra
1-Dec-14 10:33am
View
what is the problem and what result do you expect ?
Shweta N Mishra
1-Dec-14 9:39am
View
Write inside nside challanNo,ChallanDate,VehicleNo,Description means ?, Are you not able to edit those columns ?
Shweta N Mishra
1-Dec-14 6:27am
View
solution updated.
Shweta N Mishra
1-Dec-14 6:21am
View
add something like this in your gridview columns section
<asp datafield="Date" headertext="Date 1" :boundfield="Date">
<asp datafield="Date" headertext="Date 2" :boundfield="Date">
<asp datafield="Date" headertext="Date 3" :boundfield="Date">
Shweta N Mishra
1-Dec-14 6:18am
View
you can do that in gridview. To do that first bind your gridview from dataset returned from SQL and then add columns to Gridview and give the column value to have the Date column value.
check this
http://www.c-sharpcorner.com/uploadfile/61b832/adding-bound-columns-to-gridview-in-Asp-Net/
Shweta N Mishra
1-Dec-14 6:12am
View
np;)
Shweta N Mishra
1-Dec-14 6:07am
View
np:), Mark the answer as accepted and rate it if you find it useful.
Shweta N Mishra
1-Dec-14 5:03am
View
put your sample table data above your expected result to better understand your issue.
that was a sample code , you could modify it as per your requirement.
Shweta N Mishra
1-Dec-14 4:56am
View
Your Report path just the name of report, Try to make it full URL and then check.
Shweta N Mishra
1-Dec-14 4:12am
View
np:)
post your solutions also for others reference
Shweta N Mishra
28-Nov-14 11:51am
View
thank you :)
Shweta N Mishra
28-Nov-14 9:36am
View
mark as accepted and rate it if it helped you.
Shweta N Mishra
28-Nov-14 8:36am
View
do you have a smtp configured at your end ?
You can not access yahoo's SMTP, you do not have access to it.
Shweta N Mishra
28-Nov-14 8:12am
View
check now
Shweta N Mishra
28-Nov-14 6:54am
View
updated in solution
Shweta N Mishra
28-Nov-14 6:51am
View
thanks
Shweta N Mishra
28-Nov-14 6:43am
View
thast what i need to know that are you getting an empty row or a row with null values.
updating my solution for filling your data when you get a empty row.
Shweta N Mishra
28-Nov-14 6:36am
View
does your data field in table contains both firstname and lastname in same column ?
Shweta N Mishra
28-Nov-14 6:32am
View
and is there a value for sm.EmpCodeC,sm.EmpNameC ?
Shweta N Mishra
28-Nov-14 6:30am
View
np:), Marked the answer as accepted and rate it if it helped you.
Shweta N Mishra
28-Nov-14 6:29am
View
let me ask you this way do you get values for sm.EmpCodeC,sm.EmpNameC and for breakfast as NULL now ?
Shweta N Mishra
28-Nov-14 6:21am
View
Post your result which you get after running your query.
Shweta N Mishra
28-Nov-14 6:21am
View
if there is no record return then not,but there is other way to do that. first can you answer my question do you get any record out of your selection even null ?
Shweta N Mishra
28-Nov-14 6:15am
View
its definatly data type issue, convert both side to string explicitly and then try to match them.
Shweta N Mishra
28-Nov-14 6:12am
View
does there no record return for your query or just 'BreakFast' column is empty
Shweta N Mishra
28-Nov-14 6:01am
View
well i guess you got the issue,
here you number in field is 8130232211 and you are looking for 0813023221 in it definitely it wont match as 0 is not in your column.
in your 2nd command your checking your column value 8130232211 in 0813023221 it wouldnt match as last 1 of your column value is not present in your string.
for you 3rd command if you reverse it you will have result
select nam,number from contacts wheer INSTR(numbr,'813023221')>0
Shweta N Mishra
28-Nov-14 5:50am
View
thats because you are trying to do this against a number field not character, First convert the field to character and then look for an string
Shweta N Mishra
28-Nov-14 5:40am
View
can not see anything. its blank. But above solution should work as it was working with
select INSTR('0123456','123456') -- will work when your column will have 0123456
and search string is 123456
select INSTR('123456','0123456')-- will work when your column will have 123456
and search string is 0123456
Shweta N Mishra
28-Nov-14 5:32am
View
Thats good, only one condition would work for you at a time.
So would have to write your condition as
where INSTR('0123456','123456')>0 or INSTR('123456','0123456')>0
i.e. where INSTR(column,'123456')>0 or INSTR('123456',column)>0
Shweta N Mishra
28-Nov-14 5:26am
View
do not have teamviewer installed on my machine.
Shweta N Mishra
28-Nov-14 5:25am
View
Your are saying that
select INSTR('0123456','123456') does not work, Can you run below static query in your enviornment and confirm the result
select INSTR('0123456','123456')
select INSTR('123456','0123456')
Shweta N Mishra
28-Nov-14 5:17am
View
No, its not the way it should work, i do not have enviornment to check.
your column contains 123456 and string you are looking for is 0123456 then
INSTR('0123456',column) or in reverse case it should work.
Shweta N Mishra
28-Nov-14 5:14am
View
And INSTR(column,'0123456') ?
Shweta N Mishra
28-Nov-14 5:11am
View
Ok, Try INSTR
Shweta N Mishra
28-Nov-14 4:15am
View
convert them to have same datatype as you have in database.
Shweta N Mishra
28-Nov-14 4:14am
View
which SQL version you are using ?
Shweta N Mishra
28-Nov-14 4:11am
View
there is everything what you need, Should be able to convert it into your desired requirement. is it first time you are going to write a code for sending mail ?
(chaging the solution little bit , may work for you)
for converting it to csv there is no extra code written.
What you can do is the just a pass the parametr of seperator.
Shweta N Mishra
28-Nov-14 3:41am
View
+5 :) i do not understand why people downvote without any explanation/reason.
At least they should have courtesy to comment what they didnt felt right so that we can further improvise our solutions.
Shweta N Mishra
27-Nov-14 9:18am
View
in his example it looks like a variable but i think its not true , He is looking for a string instead.
Shweta N Mishra
27-Nov-14 6:22am
View
You need to mention tables and sample records . Explain your available information with you and then issue faced to get desired result.
Shweta N Mishra
27-Nov-14 5:53am
View
what is the table you are going to use and what you have tried so for.
Shweta N Mishra
27-Nov-14 4:48am
View
why you are using top 1?
Shweta N Mishra
27-Nov-14 3:55am
View
np:)
Shweta N Mishra
27-Nov-14 3:31am
View
np :) Mark the answer as accepted, if it worked for you.
Shweta N Mishra
27-Nov-14 3:08am
View
Its correct, But it means that there are duplicate Name records More than 2
you can check by above query again, i am modifying it.
Shweta N Mishra
26-Nov-14 10:18am
View
in Above result which you expect txtAddress(ControlNameID) Type is not U then also its in your result, How?
Shweta N Mishra
26-Nov-14 6:56am
View
I understand what you are saying, but you could not do this in SQL
check this
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/170c6fe1-3392-4a66-bc13-37a59f1d5967/how-to-get-all-parameter-names-along-with-their-values-in-stored-procedure-which-is-being-executed?forum=transactsql
But you can do this in your UI coding.
Shweta N Mishra
26-Nov-14 6:18am
View
Declared parameters you mean the variable declared inside sp ?
Or you only want to trace the parameter values passed to the SP while executing it ?
Shweta N Mishra
25-Nov-14 13:56pm
View
i have a doubt that how do you filter with this range
Shweta N Mishra
25-Nov-14 10:39am
View
np; if any field is missing then obviously it wouldn't work, as it does not know where to start and which line represents referer etc.
Shweta N Mishra
25-Nov-14 8:32am
View
Is the string format is fixed, I mean that After host line connection would come ?
and after Referer like Accept-Encoding line would appear
Shweta N Mishra
25-Nov-14 8:22am
View
do mean to extract
'Host: apps.developermedia.com'
& 'Referer: http://www.codeproject.com/Articles/25600/Triggers-SQL-Server
from given string ?
Shweta N Mishra
25-Nov-14 8:05am
View
what does Pivot results to you ?
Shweta N Mishra
25-Nov-14 5:58am
View
Dear everyone is here to help each other, But if you will post same question again and again in different way, Many people is going to start giving the same answer which you have got earlier(like the one you have below, which was answered by King fisher earlier), This way you are not getting your solution and others time is getting wasted,if you ask same think in your earlier thread it will save other time and you may also get your solution.i hope you understand this .
Shweta N Mishra
25-Nov-14 5:23am
View
np :), Mark it as accepted if it works for you.
Shweta N Mishra
25-Nov-14 5:22am
View
Deleted
np :), Mark it as accepted if it works for you.
Shweta N Mishra
25-Nov-14 5:21am
View
You are asking same question again and again why dont you clear it out in one thread only, It Makes other to rework same solution for you again and again.
Shweta N Mishra
25-Nov-14 4:30am
View
On what basis you select which Stored procedure to execute ?
Shweta N Mishra
25-Nov-14 4:19am
View
what is 1,56 or 2,56 ?
Shweta N Mishra
25-Nov-14 3:35am
View
Why you want to show 1 million of record in SQL Management ? Loading / Viewing such records obviously will take some time.
Shweta N Mishra
24-Nov-14 9:05am
View
Write to author of the program.
Shweta N Mishra
24-Nov-14 7:56am
View
You already had the same question here
How-to-using-webservice-in-asp-net
Then why again same question ?
You can update your existing question to brief it.
Shweta N Mishra
24-Nov-14 7:05am
View
so whats not meeting to your requirement ?
Shweta N Mishra
24-Nov-14 6:54am
View
you appreciated the answers and now your are saying its not working ?. Whats is new in your requirement now which does not meets your requirement.
Shweta N Mishra
24-Nov-14 5:25am
View
imagine the scenario that if some one withdraws his balance would reduce ,but date would be max of all.
Shweta N Mishra
24-Nov-14 5:23am
View
He may break in future, these are sample records in think.
Shweta N Mishra
24-Nov-14 5:09am
View
may be its working for this case but look at this
10,000.00 21/12/2014 010001801000007
15,000.00 21/01/2014 010001801000007
20,000.00 15/01/2014 010001801000007
29,550.00 21/01/2014 010001801000007
34,550.00 21/02/2014 010001801000007
i have changed 1st records date 21/12/2013 to 21/12/2014.
check your query on this data
Shweta N Mishra
24-Nov-14 4:47am
View
this will give wrong output.
Max(balance) may not be of the balance for the Max(convert(datetime,fdate,103)).
Date would be picked from another row and balance from other
Shweta N Mishra
24-Nov-14 4:43am
View
0 column does that have any defined length for varchar ?
like varchar(20) or its only varchar
Shweta N Mishra
24-Nov-14 4:39am
View
What kind of improvement you need and what is your required result ?
Shweta N Mishra
24-Nov-14 4:23am
View
your question is not clear , your records are not duplicate. so on which basis you want to have last five unique records.
Shweta N Mishra
24-Nov-14 3:15am
View
What are the result you expect against each row, Add that also i your question to make it more clear.
Shweta N Mishra
24-Nov-14 3:15am
View
this wouldnt work for 222
Shweta N Mishra
24-Nov-14 2:47am
View
post your sample records of results
Shweta N Mishra
23-Nov-14 5:09am
View
we asked you the actual update query which you have wrote for this table
on or after which trigger gets executed.
post that in your question too
Shweta N Mishra
22-Nov-14 13:07pm
View
Runtime error could be of many type.
Can you change customErrors mode="Off" to customErrors mode="On" only for the shake of checking error and see whats the exact issue ?
Shweta N Mishra
22-Nov-14 10:09am
View
are you able to recognize that what is the actual error
Shweta N Mishra
22-Nov-14 2:53am
View
np :)
Shweta N Mishra
22-Nov-14 2:51am
View
Yeah, Why dont you maintain a flag for delete, I mean do not delete the record just maintain a record which says that its deleted and dont use that record for any other purpose, in that way you can have deleted records information with user details too.
But its not good practice if data in table is huge.
Shweta N Mishra
22-Nov-14 2:44am
View
Pav, why dont you write attempts made to write query and whatever issue you face with syntax or in execution post here. We will be happy to help you.
Shweta N Mishra
21-Nov-14 11:04am
View
check with geography datatype.
Shweta N Mishra
21-Nov-14 10:37am
View
What is your update statement on which this trigger has executed ?
Shweta N Mishra
21-Nov-14 3:30am
View
Thank You.
Shweta N Mishra
21-Nov-14 2:48am
View
if you do have some situation and want to know which one be best to use then post that here with details
Shweta N Mishra
20-Nov-14 14:10pm
View
Put some sample records of your table and show what you want to display in your textbox, write the code which you have tried so far
Shweta N Mishra
20-Nov-14 7:02am
View
select * from
(
select *,Row_Number() Over (order by ModifyDatedesc ) As LatestRecord from Table order by ModifyDate desc
) a where LatestRecord=1
You will get the latest record.
Shweta N Mishra
20-Nov-14 6:14am
View
Please mark the solution as accepted of that helped you.
Shweta N Mishra
20-Nov-14 5:44am
View
for tables you need to take the backup by a script or by server.
Shweta N Mishra
20-Nov-14 5:05am
View
ok correct , it can be improved like this
select * from tablename where charindex(',7,',','+values+',' )>0
Shweta N Mishra
20-Nov-14 4:11am
View
that depends on the data in your table and the filters and parameters your are applying on it.
you idetify the issue by removing one by one parameter or filter and checking the result.
Shweta N Mishra
20-Nov-14 4:04am
View
+5
Shweta N Mishra
20-Nov-14 4:01am
View
yes, correct.
Shweta N Mishra
20-Nov-14 3:42am
View
on what basis you want only one count of Mary , i see its 7 and even a filter is applied on column3 then also its 2.
Shweta N Mishra
20-Nov-14 3:37am
View
No, If you already writing a dynamic query then you can apply above or change your dynamic query based on parameter value.
Shweta N Mishra
19-Nov-14 12:45pm
View
is This value available in both fields where you are making join with quotes ?
Shweta N Mishra
19-Nov-14 12:33pm
View
if BOM.BOMMN is a string= Machine'' then whats there in PBOM.PBOMM
Shweta N Mishra
19-Nov-14 8:26am
View
It should be the name of column based on the order of which you want to create the rownumber
Shweta N Mishra
19-Nov-14 7:45am
View
what value your Orderby variable contains?
Shweta N Mishra
19-Nov-14 6:50am
View
its should work, which SQL version you are using
Shweta N Mishra
19-Nov-14 4:37am
View
Update you SP1 and SP2 code and also explain what type of index and on which key column its been created to better illustrate the issue.
Shweta N Mishra
19-Nov-14 4:08am
View
you should be able to do that by replacing it. you can try the same thing in your development too. If that works then you are done. DO the same thing in production.
Shweta N Mishra
18-Nov-14 9:36am
View
whats the issue
Shweta N Mishra
18-Nov-14 6:57am
View
+5
Shweta N Mishra
18-Nov-14 6:57am
View
Ok yes you can try this
select *
FROM
(
select courseid,semid,roomno,studentid,ROW_NUMBER() Over ( Order BY studentid) RowID from #matrix
where courseid=1493 and semid=3
) A
full outer join
(
select courseid,semid,roomno,studentid,ROW_NUMBER() Over ( Order BY studentid) RowID from #matrix
where courseid=1493 and semid=5
) b on A.RowID=b.RowID --AND A.SEMID=b.SEMID
and i see you already have same solution from manas.
my +5 to him
Shweta N Mishra
18-Nov-14 3:51am
View
Isnull is a function in SQL which replaces Null value to given value, in above example it will replace it to zero. In C# you can use string.IsNullOrEmpty to get same result.
Shweta N Mishra
18-Nov-14 3:43am
View
put some sample record and explain and what results you need, that may help understanding your issue in better way.
Shweta N Mishra
18-Nov-14 3:22am
View
what is the data contained in each table ?, Di you tried Join on both table
Shweta N Mishra
17-Nov-14 11:06am
View
in which application you want to reset the password?
Shweta N Mishra
17-Nov-14 11:02am
View
did solution1 didnt worked for you ? have you got any other solution then post it.
Shweta N Mishra
17-Nov-14 10:04am
View
check this.
http://stackoverflow.com/questions/16304469/how-to-add-new-row-to-excel-file-in-c-sharp
Add blank rows when your excel is created.
Shweta N Mishra
17-Nov-14 8:41am
View
Please brief your requirement or scenario.
Shweta N Mishra
17-Nov-14 8:39am
View
updated the query
Shweta N Mishra
17-Nov-14 8:35am
View
Vipul are you having relation between devices and their OS.
as in i see Nokia ad_id is 1 and so is windows. Is that what relates to them ?
Shweta N Mishra
17-Nov-14 8:33am
View
I assume that user is going to select multiple tag for device e.g. Nokia and Samsung
and for platform he is going to select windows .
He needs to work with his data , thats what i missed.
Shweta N Mishra
17-Nov-14 8:27am
View
thanks.
Shweta N Mishra
17-Nov-14 8:25am
View
how you are going to read excel in C# ?, Obviously you are going to take that data into some control and then read it. in above example it takes the data in data table and skips the desired row.
Other option is to use SQL and in import you can directly apply the filter if that is ok for you.
Shweta N Mishra
17-Nov-14 7:13am
View
can you write your query, charindex only return a numeric value and can not have multiple column.
Shweta N Mishra
17-Nov-14 6:37am
View
Yes, You can do that, instead of hardcoded strings pass the dynamic URL field as string .
Shweta N Mishra
17-Nov-14 6:26am
View
Limit the number of character selection, Use substring etc.
Shweta N Mishra
17-Nov-14 6:16am
View
check this
URL-rewriting-using-ASP-NET-routing
and
can-an-aspx-page-be-given-an-alias-so-that-it-can-be-accessed-from-two-different
Shweta N Mishra
17-Nov-14 6:13am
View
is AutoPostback was on for that user control ?
Shweta N Mishra
17-Nov-14 6:10am
View
Thank you ;)
Shweta N Mishra
17-Nov-14 5:50am
View
+5
Shweta N Mishra
17-Nov-14 5:48am
View
Do you mean that, you want to store GUID and password concatenated and store in password column?
Shweta N Mishra
17-Nov-14 5:00am
View
you have specified maxlength, you should have some validation for minlength.
Shweta N Mishra
14-Nov-14 10:49am
View
i guess you are expecting that if Criteria1 <>null then only c.over_all_per>@mark1 condition should apply, is it correct ?
Shweta N Mishra
14-Nov-14 10:03am
View
i clicked on I'hav solved this myself button and it took me there, and i deleted the answer after realizing it. thanks
Shweta N Mishra
14-Nov-14 10:01am
View
got the solution already, thanks everyone.
Shweta N Mishra
14-Nov-14 10:01am
View
got the solution already, thanks everyone.
Shweta N Mishra
14-Nov-14 7:15am
View
I guess you got it from Kan07 answer
Shweta N Mishra
14-Nov-14 5:55am
View
it works for me with below example
create table #OrderTable(OrderNumber int)
insert #OrderTable select 1
insert #OrderTable select 1
insert #OrderTable select 1
insert #OrderTable select 2
insert #OrderTable select 2
insert #OrderTable select 2
insert #OrderTable select 2
insert #OrderTable select 2
insert #OrderTable select 2
insert #OrderTable select 2
insert #OrderTable select 2
insert #OrderTable select 2
insert #OrderTable select 2
insert #OrderTable select 3
insert #OrderTable select 3
insert #OrderTable select 4
insert #OrderTable select 4
insert #OrderTable select 4
insert #OrderTable select 5
insert #OrderTable select 5
insert #OrderTable select 6
insert #OrderTable select 7
insert #OrderTable select 7
insert #OrderTable select 7
insert #OrderTable select 7
insert #OrderTable select 8
Select OrderNumber,RowID=DENSE_RANK() over (order by Ordernumber desc)
into #temp
from #OrderTable
select * from #temp where RowID<=5
Shweta N Mishra
14-Nov-14 5:12am
View
does the above didnt work for you, you need to replace it to use your tables and columns, If you order number is a character, you can sort on SalesDate or whichever column which tells you that this is the latest ordernumber.
Shweta N Mishra
14-Nov-14 4:28am
View
where do you want result to be displayd, In SQL or in UI where this SP is called
Shweta N Mishra
14-Nov-14 3:59am
View
brief you situation. Are the application you are trying to close been open by you app ?
How they ran. what kind of application are those.
Shweta N Mishra
14-Nov-14 3:36am
View
this is not solution reply to the answer instead of creating another solution to avoid down voting.
Shweta N Mishra
14-Nov-14 3:32am
View
Your question is not clear
Shweta N Mishra
14-Nov-14 3:30am
View
correct your question is not clear.
Shweta N Mishra
14-Nov-14 3:28am
View
you mean you only want latest 5 records? i.e. 5th order with 3 sale and 4th order with 7 sales but only 2 records to get.
Shweta N Mishra
13-Nov-14 5:14am
View
Your welcome Ravi :)
Shweta N Mishra
13-Nov-14 5:01am
View
thanks.
Shweta N Mishra
13-Nov-14 3:59am
View
are you try to hack a system, Asking us to help you ?, We do not have or provide such kind of solutions.
Shweta N Mishra
13-Nov-14 3:37am
View
I think your query should work, You can use the "=" operator also instead of like.
What is the issue you are facing.
Shweta N Mishra
12-Nov-14 10:07am
View
Refer
https://www.simple-talk.com/sql/learn-sql-server/bulk-inserts-via-tsql-in-sql-server/
http://technet.microsoft.com/en-us/library/ms190421(v=sql.105).aspx
They all need to have the Clustered Index created on your table in same order of sorting.
So the only way for you to have the order by column sent as parameter to the SQL and then sort it after bulk insert.
Shweta N Mishra
12-Nov-14 9:59am
View
Can you sent the customized sequence to the stored procedure as a parameter and use that inside your SP after bulk copy.
Shweta N Mishra
12-Nov-14 8:15am
View
Please mark the answer as accepted if that worked for you.
Shweta N Mishra
12-Nov-14 5:55am
View
thank you :)
Shweta N Mishra
12-Nov-14 5:07am
View
It works and worked with below example
Create table #temp(col1 Varchar(10))
insert #temp select 'aatest'
insert #temp select 'ggtest'
insert #temp select 'ddtest'
insert #temp select 'test'
insert #temp select 'kktest'
insert #temp select 'mtest'
select * from #temp order by Replace(col1,'test','')
Show More