Click here to Skip to main content
15,923,087 members

sanwar_mal_jat - Professional Profile



Summary

    Blog RSS
826
Authority
40
Debator
48
Editor
16
Enquirer
262
Organiser
920
Participant
0
Author
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Reputation

Weekly Data. Recent events may not appear immediately. For information on Reputation please see the FAQ.

Privileges

Members need to achieve at least one of the given member levels in the given reputation categories in order to perform a given action. For example, to store personal files in your account area you will need to achieve Platinum level in either the Author or Authority category. The "If Owner" column means that owners of an item automatically have the privilege. The member types column lists member types who gain the privilege regardless of their reputation level.

ActionAuthorAuthorityDebatorEditorEnquirerOrganiserParticipantIf OwnerMember Types
Have no restrictions on voting frequencysilversilversilversilver
Bypass spam checks when posting contentsilversilversilversilversilversilvergoldSubEditor, Mentor, Protector, Editor
Store personal files in your account areaplatinumplatinumSubEditor, Editor
Have live hyperlinks in your profilebronzebronzebronzebronzebronzebronzesilverSubEditor, Protector, Editor
Have the ability to include a biography in your profilebronzebronzebronzebronzebronzebronzesilverSubEditor, Protector, Editor
Edit a Question in Q&AsilversilversilversilverYesSubEditor, Protector, Editor
Edit an Answer in Q&AsilversilversilversilverYesSubEditor, Protector, Editor
Delete a Question in Q&AYesSubEditor, Protector, Editor
Delete an Answer in Q&AYesSubEditor, Protector, Editor
Report an ArticlesilversilversilversilverSubEditor, Mentor, Protector, Editor
Approve/Disapprove a pending ArticlegoldgoldgoldgoldSubEditor, Mentor, Protector, Editor
Edit other members' articlesSubEditor, Protector, Editor
Create an article without requiring moderationplatinumSubEditor, Mentor, Protector, Editor
Approve/Disapprove a pending QuestionProtector
Approve/Disapprove a pending AnswerProtector
Report a forum messagesilversilverbronzeProtector, Editor
Approve/Disapprove a pending Forum MessageProtector
Have the ability to send direct emails to members in the forumsProtector
Create a new tagsilversilversilversilver
Modify a tagsilversilversilversilver

Actions with a green tick can be performed by this member.


 
GeneralPrint All table name in MS SQL Server and get total rows in tables Pin
sanwar_mal_jat12-Sep-12 1:49
sanwar_mal_jat12-Sep-12 1:49 
GeneralHow to remove Foreign key constaints and Truncate tables and recreate constaints Pin
sanwar_mal_jat11-Sep-12 21:10
sanwar_mal_jat11-Sep-12 21:10 
GeneralConvert Decimal no to Binary no. Pin
sanwar_mal_jat10-Sep-12 23:30
sanwar_mal_jat10-Sep-12 23:30 
GeneralAnchor tag for send email (mailto) , CC,BCC, Subject and Mail Message fill automatically Pin
sanwar_mal_jat7-Sep-12 1:27
sanwar_mal_jat7-Sep-12 1:27 
GeneralFacebook LIke button Pin
sanwar_mal_jat3-Sep-12 19:16
sanwar_mal_jat3-Sep-12 19:16 
GeneralEncrypt and Decrypt a string in asp.net c# Pin
sanwar_mal_jat30-Aug-12 21:10
sanwar_mal_jat30-Aug-12 21:10 
GeneralSimple but fact Pin
sanwar_mal_jat28-Aug-12 23:49
sanwar_mal_jat28-Aug-12 23:49 
GeneralGet Distinct one column From a table using multiple column different value Pin
sanwar_mal_jat24-Jul-12 2:03
sanwar_mal_jat24-Jul-12 2:03 
1st way

SQL
Select * from (  SELECT   ROW_NUMBER() OVER (
 ORDER BY ProductID) AS  RowNumber ,ProductID  ,
        Product,Title,Colour,Fabric,Weight,
        YourPrice,SalePrice,IsDeleted ,IsUploaded,IsUpdated
         FROM RSS_tblProductsMaster)xx   inner join
         ( select MAX( aa.RowNumber)as  RowNumber from  (
         SELECT   ROW_NUMBER() OVER (
         ORDER BY ProductID) AS  RowNumber ,ProductID
         FROM RSS_tblProductsMaster )
         aa group by  aa.ProductID)  YY on xx.RowNumber=YY.RowNumber



2nd way

IF OBJECT_ID('tempdb..#RSS_tblProductsMaster') IS NOT NULL                                              
BEGIN                                              
drop table #RSS_tblProductsMaster                                            
END 
SELECT   ROW_NUMBER() OVER (
ORDER BY ProductID) AS 'RowNumber',ProductID  , 
         Product,Title,Colour,Fabric,Weight,               
                   YourPrice,SalePrice,IsDeleted ,IsUploaded,IsUpdated       
             into #RSS_tblProductsMaster FROM RSS_tblProductsMaster
             
delete
FROM #RSS_tblProductsMaster
WHERE  RowNumber NOT IN
(
SELECT MAX(RowNumber)
FROM #RSS_tblProductsMaster
GROUP BY ProductID)

select * from #RSS_tblProductsMaster



3rd way

  My table is 

      Col1 Col2 Col3
      1     2     3
      1     4     5
      2     5     6

Require RESULT of This table 

     Col1 Col2 Col3
     1      2     3
     2      5     6


SQL
select * from duplicate
truncate table duplicate2
--select * into duplicate2 from duplicate where 1=2



    declare @col1 int=0,@col2 int=0,@col3 int=0
    declare mycur cursor for select col1 from duplicate
    OPEN mycur
    FETCH NEXT FROM mycur INTO @col1

    WHILE @@FETCH_STATUS = 0
        BEGIN
                if not exists (select 1 from duplicate2 where col1=@col1)
                    Begin
                        select @col2=col2,@col3=col3 from duplicate  where col1=@col1
                        insert into duplicate2(col1,col2,col3) values(@col1,@col2,@col3)
                    End
            FETCH NEXT FROM mycur INTO @col1
        end

    close mycur
    deallocate mycur

     select * from duplicate2

Thanks & Regards

Sanwar

GeneralGet all of stored procedure name related of your table in sql server Pin
sanwar_mal_jat19-Jul-12 1:05
sanwar_mal_jat19-Jul-12 1:05 
Generaldifferance between Convert.ToString() and .Tostring() Pin
sanwar_mal_jat16-Jul-12 21:32
sanwar_mal_jat16-Jul-12 21:32 
GeneralCompare 2 string valuses ASCII valuse compare in sql server Pin
sanwar_mal_jat29-Jun-12 3:33
sanwar_mal_jat29-Jun-12 3:33 
GeneralConcatenate as Houseno, cityname , state , as like address Pin
sanwar_mal_jat29-Jun-12 2:13
sanwar_mal_jat29-Jun-12 2:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.