User Profile

Collapse

Profile Sidebar

Collapse
ankitmathur
ankitmathur
Last Activity: Sep 24 '10, 02:42 PM
Joined: May 10 '07
Location: Delhi
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • ankitmathur
    replied to How to compile perl code
    in Perl
    Download link

    Hi,

    Any issues with the downloaded version of this site?

    http://www.indigostar.com/perl2exe.php#Download

    The link was already mentioned above....
    See more | Go to post

    Leave a comment:


  • Hi Atli,

    Your response sure has helped me inch closer. I'm still trying to use this function of PHP as I didn't had much info about it. Will get back if I get stuck again.

    THANKS
    Ankit
    See more | Go to post

    Leave a comment:


  • How to capture MSSQL SP output / multiple select statement results?

    Hi All,

    I'm facing a problem I'm unable to find a solution for. I hope fellow members would be able to help me out.


    System Info:

    PHP v5
    MSSQL 2008
    Linux box


    Ok lets say I have a stored procedure called proc_getData which has 2 select
    statements....

    Code:
    Create Proc proc_getdata
    AS
    Select COUNT(*) From Usr_Accounts;
    select
    ...
    See more | Go to post
    Last edited by Atli; Jan 30 '10, 09:26 AM. Reason: Added [code] tags.

  • How to fetch data using OPENDATASOURCE and Linked Server

    Hi I'm using the following query to connect to my MSSQL 2000 DB1 and further use a linked server to connect and fetch data from DB2 there to get the data finally into DB3.

    Example IPs
    DB1: 1.1.1.1
    DB2: 1.1.1.2
    DB3: 1.1.1.3

    My Query
    SELECT Identifier, Count(Identifie r)
    FROM OPENDATASOURCE
    (
    'SQLOLEDB','Dat a Source=1.1.1.1; User ID=vUser;Passwo rd=getdata;'
    )[1.1.1.2].RadiusDB.dbo.S essions...
    See more | Go to post

  • Whoops!

    Your reply actually made me think, I asked a little too much from you. :)

    I must say. Its a very well explained answer. Though it took a couple of readings to start understanding it (and am still so very sure that am gonna read it more than once).

    But it was necessary to understand the logic. Atleast now I can think of playing with your code.

    Your code is a beauty to me and untill now...
    See more | Go to post

    Leave a comment:


  • Hi Delerna,

    Can you please explain what exactly P1, P2, P3, P4, P5 and C1, C2, C3, C4, C5 have been created for.

    In my requirement I just want the values to come in order. No need for their respective columns also to come as values.

    So I thought if you could explain me their purpose maybe I can curtail your query to display only the values in order without significantly affecting the code.

    Would...
    See more | Go to post

    Leave a comment:


  • Please clarify a few points

    Hi Delerna,

    Can you please explain what exactly P1, P2, P3, P4, P5 and C1, C2, C3, C4, C5 have been created for.

    In my requirement I just want the values to come in order. No need for their respective columns also to come as values.

    So I thought if you could explain me their purpose maybe I can curtail your query to display only the values in order without significantly...
    See more | Go to post
    Last edited by ankitmathur; May 9 '08, 11:24 AM. Reason: Some clarification

    Leave a comment:


  • Hi Delerna,

    WOW! and I really mean it.

    Thank you so much for helping me with this humungous query. It actually turned out to be much bigger than I thought it would be but the result is optimal.

    I am unable to find words to help you as in my vain attempts I was literally going round n round and somewhere or, the other something got missed out.

    Now, I'll try and get this BIG query to be somewhat...
    See more | Go to post

    Leave a comment:


  • Hi CK,

    Thanks for your input and I appreciate your help.

    As of now, my current requirement is for SQL 2000. But we're about to migrate to SQL 2005. So am sure your code would be of great help for me to determine the best way possible in near future.

    Just to answer some of your points.

    1. Number of columns (R's) keep varying.
    2. Number of rows will always be more than 15000+ and they too...
    See more | Go to post

    Leave a comment:


  • Hi Delerna,

    WOW! and I really mean it.

    Thank you so much for helping me with this humungous query. It actually turned out to be much bigger than I thought it would be but the result is optimal.

    I am unable to find words to help you as in my vain attempts I was literally going round n round and somewhere or, the other something got missed out.

    Now, I'll try and get this BIG query to be somewhat...
    See more | Go to post

    Leave a comment:


  • ankitmathur
    started a topic Best match query and order by columns

    Best match query and order by columns

    Hi,

    I'm trying to overcome a situation whereby I have to search through 4-5 columns and produce the results with an order by according to the values matched in these columns.

    Example:
    Code:
    My Table Structure:
     
     
    Create Table TestPfx
    (
    pfx varchar(20),
    R1 money,
    R2 money,
    R3 money,
    R4 money,
    R5 money,
    )
    Insert into Testpfx values(1,1,7,1,3,9)
    ...
    See more | Go to post

  • ankitmathur
    replied to Distinct Latest Records
    Hi CK,

    Thanks for your input I got a fair idea of how to go about it.

    Here's pretty much a same query as yours that's working perfectly fine.

    Code:
     
    SELECT U.*FROM Usr_AmtDetails U 
    JOIN (
    		 SELECT X.AcctID, MAX(X.RenewDate) AS RenewDate		FROM Usr_AmtDetails X GROUP BY X.AcctID
    		 ) D ON U.AcctID = D.AcctID AND U.RenewDate = D.RenewDate
    Thanks for your...
    See more | Go to post

    Leave a comment:


  • ankitmathur
    started a topic Distinct Latest Records

    Distinct Latest Records

    Hi Friends,



    I've been looking for an answer to this problem for quite sometime but am unable to find one. I hope someone can help me guide to the right way.

    Code:
     
    SQL Query:
     
    SELECT AcctID, AmtAfter, RenewDate FROM Usr_AmtDetails Order By AcctId
     
     
     
    Data Retrieved by the Query:
     
     
    AcctId		 |	 AmtAfter		|		 RenewDate
     
    000280196
    ...
    See more | Go to post

  • Hi CK,

    I had gone through the link you redirected me to.
    While it looked like the thing that's going to work for me unfortunately I'm on SQL 2000 & 'ROW_NUMBER' is not a recognized function name in MSSQL 2000.

    Can you suggest me a workaround for this in MSSQL 2000

    Thanks
    Ankit...
    See more | Go to post

    Leave a comment:


  • You got it absolutely right CK.

    I want only the latest record of an account regardles of it being larger than or, lesser than other values.

    However, I couldn't understand your idea about ROW_NUMBER() .

    Can you brief a lil' more on that to me.

    Thanks
    Ankit Mathur...
    See more | Go to post

    Leave a comment:


  • No Jim,

    That is actually a varchar value actually the same as AcctId.

    We have ModifiedDate though....
    See more | Go to post
    Last edited by ankitmathur; Jan 23 '08, 08:48 AM. Reason: More information provided

    Leave a comment:


  • Only Unique Data required of a table. Please help with this Query.

    Hi Friends,

    I've been looking for an answer to this problem for quite sometime but an unable to find one. I hope someone from this group can help me guide to the right way.

    Here's my SQL Query:

    SELECT AmtAfter, AcctID FROM Usr_AmtDetails Order By AcctRecharged

    Code:
    [b][u]Data Retrieved by the Query:[/u][/b]
     
    [b]AmtAfter AcctId[/b]
    2006.12 000280196
    4006.12 000280196
    0.00 002101839
    ...
    See more | Go to post

  • Thanks Deepu,

    I can't believe I was missing out something as simple as
    ExpiryDate >= GetDate()

    I was trying varying permutations but missed this simple one.

    Really appreicate your help.

    Thanks
    Ankit Mathur...
    See more | Go to post

    Leave a comment:


  • ankitmathur
    started a topic Help needed in this DATEDIFF SQL Query

    Help needed in this DATEDIFF SQL Query

    Hi Friends,

    I have been trying to use this query to get all records that will expire within the next 30 days from the current date.

    While I am getting records with the same query what is bothering is I'm also getting records for the days past by.

    Code:
    Select AccountId, ExpiryDate, DATEDIFF(DAY,GETDATE(),ExpiryDate) as DaysLeft From Usr_Accounts
    WHERE Status='Active'
    AND DATEDIFF(DAY,GETDATE(),ExpiryDate)
    ...
    See more | Go to post

  • ankitmathur
    started a topic Backup time increasing

    Backup time increasing

    [color=#191970]Hi,

    I've been noticing that while taking a snapshot backup in MSSQL 2000 the time taken to backup the database completes in around 10-12 minutes for a approx. 16GB DB but still time notified in comepleting the job in job history is around 40 minutes.

    This is happening not daily but once or, twice a week while normal reported time taken to complete the job is around 18-20 minutes.

    I reckon that...
    See more | Go to post
No activity results to display
Show More
Working...