User Profile

Collapse

Profile Sidebar

Collapse
Scorp Scorp
Scorp Scorp
Last Activity: May 29 '11, 04:30 AM
Joined: Mar 24 '11
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • @Rabbit, thanks for following up with me in this thread, and sorry if i couldnt address what i neeed properly ...

    @gershwyn

    what i have said
    Where x , y , z , v are amounts of each guy in all other entities. ie: entities left, other than 1.

    is exactly what i meant , my posted example is just a sample. I have more than one entity, but i posted it by mentioning just entity 1 and entity 2 just for...
    See more | Go to post

    Leave a comment:


  • Dear Rabbit ,

    What you are providing here is not what i need .

    By trial and error i managed find out what u have given me above .

    also i know how to get the records for certain entity .

    But this makes them 2 seperate queries ,i.e: two seperate sql statements .

    Then you just need to use a select query to select the records with entity 1 and full outer join (or its equivalent...
    See more | Go to post
    Last edited by Scorp Scorp; Apr 13 '11, 04:34 AM. Reason: more clar.

    Leave a comment:


  • Thanks gershwyn , your statmnt worked just fine, did what it supposed to do :) , thanks a lot

    Regards,
    See more | Go to post

    Leave a comment:


  • Hey gershwyn thanks for the note Access does not support the SQL you are trying to use here. I didnt know !!!

    I'll try to use your statmnt ...

    Thanks .
    See more | Go to post

    Leave a comment:


  • Syntex Error, Update Multi - colomns - multi feilds in one query .

    Dear All,
    Hope every thing going fine...

    Am trying to run this query , but am getting :
    Syntex Erro (missing operator) in query expression 'CASE code .....

    My querys is :
    Code:
    Update tb_details
    set quantity = CASE code 
    when 8668 then "2"
    when 8669 then "3"
    when 8670 then "0" 
    when 8671 then "2"
    END
    where
    ...
    See more | Go to post
    Last edited by Scorp Scorp; Apr 12 '11, 10:39 AM. Reason: more expla.

  • Rabbit and Neopa , to me now you seem from Mars guys , am not that goooood in Databases , or at least up to that level to know wat you guys talking about ...

    Didnt get it, and couldnt solve it ... butt thanks for your effort guys ... thanks.

    Thanks for the article Neopa , got an idea on join , but unfortunately couldt relate it to my example here to come up with the prorper solution.

    regards,
    See more | Go to post
    Last edited by Scorp Scorp; Apr 10 '11, 07:52 AM. Reason: More info

    Leave a comment:


  • Code:
    TRANSFORM Sum([rate]*[qty]) AS Expr1
    SELECT TEST.name, ([B][U]select SUM([rate[*[qty] From Test where[/U][/B]   [I]here i couldnt find what to put[/I]
    FROM TEST
    GROUP BY TEST.name
    ORDER BY TEST.Name DESC
    PIVOT TEST.entity;
    I tried to put a condition , where entity <>1 ... but sure didnt work .


    I tried to translate how i figure it how, but couldnt get to the right sql statment. also trying...
    See more | Go to post
    Last edited by NeoPa; Apr 7 '11, 09:59 PM. Reason: Added mandatory CODE tags. I also added underlines in the CODE to highlight the bold text in a way that works batter.

    Leave a comment:


  • Thanks Rabbit but i failed translating your words into SQL ....

    I thought multi select will do the job but non.

    Can you translate your idea into SQL ?

    thnaks in advance
    See more | Go to post

    Leave a comment:


  • Scorp Scorp
    replied to Aggregate Function Error ???
    Rabbit , it worked , great.... thaks alot .
    See more | Go to post

    Leave a comment:


  • Multi-Select Statement with Multiple Conditions

    Helloo all,

    in a previouse thread, and with a lot of help, the following table
    Code:
    ------------------------------- 
    Desc | Entity |  Name  | rate | qty 
    --------------------------------- 
    xxxx    1        Mark    100     1 
    xxxx    2        Mark    100     2 
    xxxx    1        Joe     100     3 
    xxxx    2        Kive    100     4 
    xxxx    1        Ben     100     5 
    xxxx    1        Ben
    ...
    See more | Go to post
    Last edited by NeoPa; Apr 7 '11, 09:52 PM. Reason: Fixed attempt to use CODE tags.

  • Scorp Scorp
    replied to Aggregate Function Error ???
    I tried all combinations in order and group through asset and desc ... if by lcuk to be true, but non broght up a result.

    Can you type in what will be the statment with the use of an aggregate function.

    First time use bypass.

    As reports get more complex, sqls giving more headaches , i have a more complex sql st. i will post in onother thread , may be ill find who can help.
    See more | Go to post
    Last edited by Scorp Scorp; Apr 6 '11, 07:10 AM. Reason: rec

    Leave a comment:


  • Scorp Scorp
    replied to Aggregate Function Error ???
    i tried :
    Code:
    Select asset, desc from tb_test GROUP BY asset order by asset
    same error
    also tried
    Code:
    Select asset, desc from tb_test GROUP BY asset order by desc
    same error.


    up to my knowledge , if the value of the desk returned per asset are different than each other then it generates an error. while if they are equal , which is the case , error should not generate.
    ie: for all asset 11...
    See more | Go to post
    Last edited by Scorp Scorp; Apr 6 '11, 06:50 AM. Reason: more info

    Leave a comment:


  • Scorp Scorp
    replied to Aggregate Function Error ???
    hey rabbit
    but this will not solve , if later i need to get SUM of two feilds for each record and present it as total for each asset, thats why am using group by.
    See more | Go to post

    Leave a comment:


  • Scorp Scorp
    replied to Aggregate Function Error ???
    Thanks Vijay , but i mentioned Desc just a shortcut to my Description field, sorry.

    Its not the key word issue.
    thanks any way
    See more | Go to post

    Leave a comment:


  • Scorp Scorp
    started a topic Aggregate Function Error ???

    Aggregate Function Error ???

    Am in the following cenario:

    Table: tb_test
    asset and Desc are of text type feilds.
    Code:
    ----------------------
    prt1 | prt2 | asset | Desc
    ----------------------
     1      1      11      xxx
     2      1      21      yyy
     1      2      12      zzz
     1      1      11      xxx
     2      1      21      yyy
    ============================
    What i want to...
    See more | Go to post

  • Thanks a lot, you really made my DAYYYY.

    Appriciate your follow up ..
    See more | Go to post

    Leave a comment:


  • As a start to let u see whats going on :
    1)select one ofthe forms in your database
    2)open it in design view
    3)Select the button control from the toolbar
    4) draw a square on your form
    5)Click cancel if the Command Button Wizard window appear
    6) Select event from the Property Sheet of that button
    7) Point to OnClick
    8) click on the dotted button next to it
    9) a Choose Builder will appear...
    See more | Go to post

    Leave a comment:


  • Solved the total per each colomn , i shoulda place the textbox =SUM([1]) in the Report Footer Section not in the Page footer , my mistake .

    But still need the total per row ... cant figure out how .... any ideas are welcomed :)
    See more | Go to post

    Leave a comment:


  • Okk
    First of all when you create a Database no code is associated with it.

    Open your database file, then hold the Alt Key and press F11. A window will open (Microsoft Visual basic) enviroment platform. where you can write code.

    The code you have provided in your question, is associated to a group of controls, like buttons, comboboxes, and other controls.

    Coding is associated with events, in your...
    See more | Go to post

    Leave a comment:


  • thank for the reply Lysander,you almost made my day .
    i just selected test.name so i got the following:
    which made no difference, just changed the look of the result
    Code:
    TRANSFORM Sum([rate]*[qty]) AS Expr1 
    SELECT TEST.name
    FROM TEST 
    GROUP BY TEST.name
    ORDER BY TEST.Name DESC  
    PIVOT TEST.entity; 
    
    What i got as a result is :
    ==========================
    Names
    ...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...