User Profile

Collapse

Profile Sidebar

Collapse
Mahdis
Mahdis
Last Activity: Nov 30 '12, 12:02 AM
Joined: Nov 26 '12
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Mahdis
    replied to Attach 2 Tables (Complex Joins)
    Attach 2 Tables (Complex Joins)



    So When I have a table that every week should be updated in part of table (just some columns) that results from 1 week ago, so what should I do, could u pl just tell me that? Thank u so much.....


    Id_date Id_Branch NewBalance($) OldBalance($)
    07/08/2012 2014 140000
    07/08/2012 1354 120000
    07/08/2012 1014 170000
    ---------------------------------------------------------...
    See more | Go to post

    Leave a comment:


  • Mahdis
    replied to Attach 2 Tables (Complex Joins)
    Attach 2 Tables (Complex Joins)



    No, as a matter of fact I should say MyTable 2 comes out of the MyTAble 1 after every week, that means, after 1 week, actually I have new data like third Table as shown(MyTable3) , that should be added to end of MyTable 1(for example named MyTable 2) and NewBalance should be changed to OldBalance with new rows, it means in real I haven’t MyTable2 and when I’d wanted to solve...
    See more | Go to post

    Leave a comment:


  • Mahdis
    replied to Attach 2 Tables (Complex Joins)
    Attach 2 Tables (Complex Joins)



    Oh Sorry I’d forgotten to explain that, MyTable 1 have some other Columns too, and with them makes primary key(like Id_Code+IdCount ry) and also, weekly, new data is added to and NewBalance is changed to OldBalance for new week, so I should Show OldBalance, next to the Id_date, Id_Branch, Id_Code, IdCountry and NewBalance to GridView in asp.net...
    See more | Go to post

    Leave a comment:


  • Mahdis
    started a topic Attach 2 Tables (Complex Joins)

    Attach 2 Tables (Complex Joins)

    Hi,

    I have a small problem of the following Tables, I have MyTable1 (for example) and I want to attach content of following MyTable2 to MyTable1, but MyTable2 have the Data just 1 week ago, and it should be in appropriate columns against that columns in MyTable1, pl tel me what can I do?


    MyTable 1 :

    Id_Date Id_Branch NewBalance
    07/08/2012 1270 160000
    07/08/2012 1654 170000...
    See more | Go to post

  • Mahdis
    started a topic SubQuery with more than one row

    SubQuery with more than one row

    Hi,

    i want to execute this Query :

    Code:
    SELECT Id_date
         , Id_unit
         , Id_code
         , credit
         , debt
         , Balance
    FROM   tbl_Summery
         , (select Balance
            from tbl_Summery
            where Id_date='02032012') as [MandGL]
    where  Id_date='02032012'
    but i always received an error of: "Subquery returned more than 1 value. This is not permitted...
    See more | Go to post
    Last edited by NeoPa; Nov 28 '12, 02:27 PM. Reason: Tidied layout and added [CODE] tags (which are NOT optional).

  • Mahdis
    replied to Reporting Weeky Balance in a table
    thanks Rabbit,your suggestion was verry Gooood, and i got my answer...

    Thanks every one, i'v got it,in SSIS i fetched that FlatFiles by Foreach Loop, then Created a Table named MyTable, then fetched data from FlatFile Source and directly saved all of them in to the MyTable,in Sql Server, with SSIS, after that, in Asp.net i created a WebForm and showed cBalanceAgo by following code to SqlCommand that got Date from User:

    ...
    See more | Go to post
    Last edited by NeoPa; Nov 27 '12, 03:06 PM. Reason: code tags added and posts merged.

    Leave a comment:


  • Mahdis
    started a topic Reporting Weeky Balance in a table

    Reporting Weeky Balance in a table

    Hi,
    I want create a table with a Date Column named cDate, a column that shows weeky Balance named cBalance and a column that shows Balance of 1 week ago Named cBalanceAgo, and weekly i have to fetch data from this table to show on GridView, but i have to fetch this table from a FlatFile in SSIS and with Derived Column add cBalanceAgo, and save in this table, So what's the proper way to do something like this because i don't know how can i...
    See more | Go to post
No activity results to display
Show More
Working...