Jump to content

maliary

Members
  • Posts

    223
  • Joined

  • Last visited

    Never

Posts posted by maliary

  1.  

    The link after copying the files -- not working

     

    file:///C:/Banking/content/BankDefinitions/index.htm

     

    The link before copying the files -- working

     

    D:\Banking\content\BankDefinitions\index.htm

  2. Hello,

     

    I have come up across this problem before but I have forgotten how I overcame it. I have a site on CD with HTML links. All the links work well when viewing the site on CD however when I copy it on my desktop, they are not accessible.

     

    How can I set the link locations so no additional '/// ' or paths are added onto the existing path ? i.e. so that it can work the way it does on the cd ?

  3. Hello,

     

    I am getting the error Fatal error: Maximum execution time of 30 seconds exceeded in <url to the php page> line 334 . This error is on and off. Nothing wrong with the code as seen below, the red part is the line in question, that the error points to .

     

    I change the max time limit in php.ini and set it to 45. This is not the best solution for this I know,but my question is : Do server delays result in this kind of error we are having here ?

     

    $flag=null;
    $y=0;
    while($test_request=$requests->FetchRow())
    {
        $flag[$y] = false;
        //check if numbers have been already printed
        $len=count ($printed_nrs);
    
        for ($x=0;$x<$len;$x++)
        {
         [b]Line 449 is here :-[/b]  if (strcmp ($test_request['batch_nr'],$printed_nrs[$x]) == 0 )
            {
                $flag[$y]=true;
                $flag[$x]=true;  
            }
       }   
       $printed_nrs[$x]=$test_request['batch_nr'];
       $y++;
    }

  4. Hello,

     

    I would like to create a query from a single table with the following columns.

     

    SEQNO is a unique key

     

    Name  ID  Amount  Date            JOBID        SEQNO

    Mark    9        200    1/2/09        1001              1

    Peter  3        300    1/2/09        1001            2

    Steve  1        200    2/2/09        1001            3

    Mark    9        200    3/2/09        1001              1

    Peter  3        300    4/2/09        1001            2

    Steve  1        200    5/2/09        1001            3

    Hally 1        200      5/2/09        1002            3

     

    The query should output in this format by SUBJOBID :-

     

    NAME      ID    1/2    2/2    3/2    4/2    5/2              JOBID

    Mark        9      200  NULL    200    NULL  NULL            1001 

    Peter      3      300    NULL  NULL    300    NULL            1001 

    Steve      1      NULL  200    NULL    NULL    200            1001 

     

    I have been going over pivot queries for this. But I don't seem to get anywhere. Could some one help ?

     

     

  5. Hello,

     

    Am using MySQL 5.0

     

    I have this query

     

    SELECT name FROM dbo.tablenames

     

    Which gives the following

     

    jimmy

    robert

    michael

     

    I would to display that column information in one row such as

     

    jimmy robert michael

  6. Hi ,

     

    I have the following code

     

    ISNULL(CAST(T1.[DocDate] AS varchar(50)), 'Nothing') 

     

    where T1.[DocDate] is null, the code correctly returns 'Nothing' if it is not null then the code returns the date but in varchar format e.g. Apr 17th 2009. I would like to display the date as 17/04/2009 is this possible ?

     

  7. I have this

     

    
    SELECT T0.[itemCode], T0.[Dscription], T0.[Quantity] as 'Iss. Qty', T0.[DocDate] as 'Iss. Date', ISNULL (T1.[Quantity],0) ,
    
    CASE
    WHEN ISNULL (T1.[Quantity],0) = 0 THEN ISNULL(CAST(T1.[Quantity] AS varchar(50)), 'Nothing') 
    WHEN ISNULL (T1.[Quantity],0) != 0 THEN ISNULL(CAST(T1.[Quantity] AS  varchar(50)), 'Nothing') 
    END,
    
    CASE
    WHEN ISNULL (T1.[DocDate],0) = 0 THEN ISNULL(CAST(T1.[DocDate] AS  Char(20)), 'Nothing') 
    WHEN ISNULL (T1.[DocDate],0) != 0 THEN ISNULL(CAST(T1.[DocDate] AS  datetime), 'Nothing') 
    END
    ,
    ISNULL(CAST(T1.[Quantity] AS varchar(50)), 'Nothing') as 'Recieved Qty' , T0.[u_Newfield], ISNULL(CAST(T1.[DocDate] AS varchar(50)), 'Nothing')  ,COALESCE (CAST (T1.[DocDate] as Char(20)),'NOT')  as 'Rev. Date' FROM IGE1 T0
    
    LEFT OUTER JOIN IGN1 T1 
             ON  T1.[u_GI_Issue] =  T0.[DocEntry] WHERE T0.[u_Newfield] = [%0] and  T0.[DocDate] between [%1] and [%2]
    
    

     

    When ISNULL (T1.[DocDate],0) = 0 it throws an error

     

    Conversion failed when converting datetime to character string.

  8.  

    Thanks, this works well only that the quantity field is changed to varchar, no problem with that though. However I have tried the same with the DocDate field

    but the date format is not the best when not null. I would like to change the date format from Arp 17 2009 - varchar to the datetime format.

     

    This I believe would require the use of case or if else statements. but they keep giving me the same error I have been having.

     

     

  9. Hello,

     

    I have the following query in MSSQL 2005, where T1.[DocDate] is null then it should display NOT RECIEVED, if it is there it should display the date.

     

    However I get the error message converting failed when converting datetime from character string

     

    SELECT T0.[itemCode], T0.[Dscription], T0.[Quantity] as 'Iss. Qty', T0.[DocDate] as 'Iss. Date',  ISDATE(T1.[DocDate]) as 'Rec. Qty', 
    
       CASE 
        WHEN ISDATE (T1.[DocDate]) = 1 THEN T1.[DocDate]
        WHEN ISDATE (T1.[DocDate]) <> 1 THEN COALESCE (CAST (T1.[DocDate] as datetime),'NOT') 
       END 
    AS 'Recieved Date'
    ,
    T0.[u_Newfield], T1.[DocDate] as 'Rec. Date' FROM IGE1 T0
    
    LEFT OUTER JOIN IGN1 T1 
              ON  T1.[u_GI_Issue] =  T0.[DocEntry] WHERE T0.[u_Newfield] = [%0] and  T0.[DocDate] between [%1] and [%2]
    

     

     

  10. Hello,

     

    I have the query below, for some columns such as Rec. Qty, no values are returned. Where there is no value returned I would like to put the word 'Nothing', instead of having a blank.

     

    SELECT T0.[itemCode], T0.[Dscription], T0.[Quantity] as 'Iss. Qty', T0.[DocDate] as 'Iss. Date', T1.[Quantity] as 'Rec. Qty', T0.[u_Newfield], T1.[DocDate] as 'Rev. Date' FROM IGE1 T0

     

    LEFT OUTER JOIN IGN1 T1

              ON  T1.[u_GI_Issue] =  T0.[DocEntry] WHERE T0.[u_Newfield] = [%0] and  T0.[DocDate] between [%1] and [%2]

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.