About Me

I am Munish Bansal, working as a Software Professional with one of the leading IT Companies in India.

I have started this blog keeping in mind that people will share their knowledge, professional experiences, ideas & queries etc with others to help each other and everybody will be in pace with the updated technologies.

48 Responses to About Me

  1. You are doing real good work buddy… keep it up 🙂

  2. Hey Harman,
    Thanks a lot for your encouragement…!
    I’ll try to make it more & more useful down the time.
    Keep in touch.

    thanks,
    Munish Bansal

  3. Ali says:

    Hi,
    im ali
    i live in Iran

    Please Help Me,
    For Create Website Tab ,Alike Your Website’s.

    thanks.

  4. Hi Ali,

    I really didn’t get your requirement. Please make it more clear so that I may help you out something.
    Thanks.

  5. Kaladhar says:

    Need help in SQL server reporting Services.
    I have input parameters like

    BachNumFrom, BatchNumTo, StartDate and Enddate

    I have Dropdownloist which has values PaymentDate and BatchNumber

    When I select PaymentDate in dropdown list I need to Enable Start Date and End date parameters and disable the BatchNumFrom and BatchNumTo parameters.

    When I select BatchNumber in dropdown list I need to Enable BatchNumFrom and BatchNumTo parameters and disable the Start Date and End date parameters .
    Can anybody please let me know how to do in SSRS report

    Thanks in Advance.
    Kaladhar

  6. Hi Kaladhar,

    You can somehow achieve it using dependent parameters. I mean you can make data set for ‘Start Date and End date’ dependent upon the value from PaymentDate. And thus until & unless some value is selected from PaymentDate, Start Date & End Date parameters would be disabled.
    Similiarly you can do for other set of parameters.

    This all is required if you are using Report Manager to display your reports, but if you have liberty to use Report Viewer or so, you can easily implement these kind of functionality using custom drop down lists etc.

    Munish Bansal

  7. Hanna says:

    Hi,

    I want to send all the items of listbox to a stored procedure where stored procedure can select records from database on basis of all those parameters.

    Please help me out.

    I’ll b thankful…

    Regards,

    Hanna.

  8. Hey Henna,

    Then you can pass/use the same logic/query in SP which you are using to get the data set for listbox/drop down list.

    Munish Bansal

  9. Jerry says:

    Hi Munish,

    Your article and response to my query is a big help on me.

    I have another problem with regards to the implementation in SSIS.

    I have two tables in database
    – ParentTable
    – ChildTable

    and have foreign key constraint

    The goal is to archive the data from Database1 and move the records to Database2.

    My query to the table is
    SELECT *
    FROM ParentTable p
    INNER JOIN ChildTable c
    ON p.ID = c.ID
    WHERE

    At the end of the execution of package and after the records are copied to Database2, I need to delete the transferred records in Database1.

    The problem is, in SELECT condition i used the columns value of both parenttable and childtable to meet the requirements, and when i delete the records in childtable the conditions are still met. But when i delete the records in ParentTable the conditions are not satisfied since the reference to ChildTable is gone (deleted).

    My plan is to get all the IDs of Parent records from the ParentTable of Database2. using that IDs i can delete the records in ParentTable of Database1 without using the conditions that need to refernce to ChildTable of Database1.

    My plan is, get the ID’s using Execute SQL Task and store the IDs in a variable with type of Object (this is expected that all IDs are saved in the variable). Then, used the variable in the Query of Delete Statement.

    DELETE ParentTable
    WHERE ID IN ()

    How can i implement this in SSIS?

  10. Hi Jerry,
    You should first copy all those records from database1 to database2 by using a DFT. In this DFT use an OLE DB source and an OLE DB destination.
    Now use an Execute SQL Task to delete those records from database1.
    For deleting such (parent-child) records from database1, you can use the following query:

    DECLARE @TempTable Table
    ( ID INT)

    INSERT INTO @TempTable
    SELECT PT.ID FROM ParentTable PT INNER JOIN ChildTable CT
    ON PT.Id = CT.Id

    DELETE FROM ChildTable WHERE ID IN (SELECT ID FROM @TempTable)
    DELETE FROM ParentTable WHERE ID IN (SELECT ID FOM @TempTable)

    -Munish Bansal

  11. Jerry says:

    Hi Munish,

    Thank you for your response.

    Aside from the implementation that you mention.

    The Data Architecture team requires us not to use a storedprocedure and not to use physical Temporary Tables. But this idea is great! 🙂

    Is the @TempTable is created physically using the script you created?

    Is there are other ways to implement this using SSIS components only, without using storeProcedure.

    Like:
    DFT —> gets the IDs in either Database1 or Database2
    and use the IDs in another SSIS component
    like the Executre SQL Task. Is this possible?

  12. Jerry says:

    Hi Munish,

    Thank you for your response, this is a great help.

    I have a few questions.

    Is the script is a stored procedure? and is the @TempTable created physically?

    The Data Architecture team requires us not to use SP and physical Temporary tables. But this is great.

    Do you have any idea on how to implement this using simple query and ssis components.

    Thanks in advance 🙂

  13. Hey Jerry,

    You can use the above mentioned query directly in the ExecuteSQL Task, no need to create a separate stored procedure for that.
    Also @Table is just an in-memory table, it’s not created physically in the database.

    -Munish Bansal

  14. Jerry says:

    Thank you so much Munish. You’re a big help to me 🙂

  15. Jerry says:

    Hi Munish,

    With regard to the implementation of the above query. It works well if the package is connected in localhost, but when i change the connection to other pc (build machine that act as server)

    I got this error message:
    [Execute SQL Task] Error: Failed to acquire connection “IP\ESA_FY09_02_Dev.2334_EnablServiAppli_Prod_BK”. Connection may not be configured correctly or you may not have the right permissions on this connection.

    When i open the Execute SQL Task and click Build Query. the error message below is displayed.

    “The Declare cursor SQL construct or statement is not supported.”

    I click ok button of the message box and Query Builder window is displayed. But when i run the script a login window is displayed to connect to the server.

    How to implement this without any connection problem..

    Please help me.

  16. Aashi Mittal says:

    Hello Munish,

    good work…i appreciate..
    aneways i m searching code for disabling Ctrl C option in my aspx page..

  17. Sudarshan says:

    Hey Munish,
    Great work i really Appreciate.

    in your blog there is no Attachment option.if at all i can send my Report so that u can understand well my Problem is.

    Here
    i need to Design a Report
    10 Colums Totally.
    first 3 columns will use “State” as Parameter and
    the other 3 columns use “IV-E” as paramter and
    rest use the “IV-A”.
    These 3 are @Payment Type Pmts.
    should i go with Su-Rpts or Any other Solution for this Situation.
    Plese Reply me ASAP.
    Thanks for the Everthing.

  18. Hey thanks a lot for your appreciation, Sudarshan.

  19. Qaiser says:

    Hey Munish.

    I need to ask that, i need to automate a process which is to log in to a website by entering the credentials and then we choose the year and reporting period , choose the type of report and view the report and sales figures on a website. this website is in JSP basically. and i dont know how to call the items of the website. There are Javascripts being used like the calendar, from where we select the year and month or day.

    So my question is , is it possible to make it happen by using SSIS package. where the package would automatically connect to the website, select the reporint period and then once the results are shown , download it in CSV file format to the local drive. As there is an option of downloading the result in CSV file on the website , but it is only shown once all the selections are made ?

    So i be glad if you have any idea how to do such task , so is it even posssible to do so ?

    Thank you

    Qaiser

  20. Vel says:

    HI
    I need help in SSIS
    I have lenthy Query in that we have lots of case statements for that query we need to create SSIS pkg
    plz let me know which transformation is suitable for case statements

    Thanks!
    Vel

  21. Jerry says:

    Hi Vel,

    Much better if you placed a case condition that you’ve mention in order to simulate or discuss it clearly.

  22. Vel says:

    HI Jerry,
    Thanks for reply
    here is my part of the query including the case statement

    CASE
    WHEN SUBSTR(TableName.Column1,-6,5) IN (‘11353′,’10080’)
    THEN ‘Region1’
    WHEN SUBSTR(TableName.Column2,-6,5) = ‘10920’
    THEN ‘Region2’
    WHEN SUBSTR(TableName.Column2,-6,5) = ‘10048’
    THEN ‘Region3’
    WHEN SUBSTR(TableName.Column2,-6,5) = ‘10053’
    THEN ‘Region’4
    WHEN SUBSTR(TableName.Column2,-6,5) = ‘10073’
    THEN ‘Region4’
    WHEN SUBSTR(TableNameColumn2,-6,5) = ‘10068’
    THEN ‘Region5’
    WHEN SUBSTR(TableName.Column2,-6,5) = ‘10057’
    THEN ‘Region6’
    WHEN SUBSTR(TableName.Column2,-6,5) = ‘10052’
    THEN ‘Region7’
    WHEN SUBSTR(TableName.Column3,-6,5) IN (‘10163′ ,’10169′ ,’10190′ ,’10164′ ,’10775′ ,’10194′ ,’10166′ ,’10087’ , ‘10178’ ,’10184′ ,’99999′ ,’10199′ ,’10195′ ,’10182′ ,’10185′ ,’10183′ ,’11267′) THEN ‘Region8’
    WHEN SUBSTR(TableName.Column3,-6,5) IN (‘10130′ ,’10934′ ,’10128′ ,’10047′ ,’10135′ ,’10119′ ,’10139′ ,’10127′ ,’10143′ ,’10125′ ,’10132′ ,’10120′ ,’10141’)
    THEN ‘Region9’
    ELSE ‘Unknown’
    END “Filedname”

    Like this I have more case statements in my Query and we are getting the data (Using diff tables from Oracle) from Oracle to Sql server

    Plz help me

    Thanks!
    Vel

  23. Easvaran says:

    Hi Munish,
    You are doing a great service. Keep it going.

    I have a doubt. How to import data from a CSV file containing comma’s for their field values.
    The default field delimitter for CSV file is comma(,). But if we also have comma for field values, how can we import such data correctly into a table.

    Need Help

  24. Hi Easvaran,

    If you have got comma as the field delimiter as well as in the values itself, you can configure to automatically detect & split the values untill & unless you know the max. width of the column data i.e. you can go for fixed width option while configuring the Flat File Connection Manager.

    Thanks,
    Munish Bansal

  25. Munish,

    Here’s a question for you:

    Do you know how to increase the line thickness in the legend of a Dundas chart?

    We use high-resolution charts and it is difficult for our users to decipher the colors in the legend. To solve this problem, we wish to make the lines thicker, so they would be easier to see.

    I’ve had this question posted on the Dundas support site for over a year but they haven’t responded. I thought you might know how.

    Thanks in advance for your response.

    Rick Garrison

  26. Manu says:

    hi
    I need a solution of extracting multiple excel sheets from multiple excel files which are residing in a folder called EXCEL FILES without using the script task .. ( ssis 2008 )
    Eg: EXCEL FILES ( DIR )
    ExcelFile1 — > Sheet1, Sheet2, Sheet3
    ExcelFile2 — > Sheet1, Sheet2, Sheet3
    .
    .
    .
    ExcelFilen — > Sheet1, Sheet2, Sheet3

    The Schema is same for everysheet

    Thnks
    SM

  27. Kiran Nalluri says:

    Hi Munish,
    Can you send me the sample code for Dynamic columns mapping – Script Component as Destination (SSIS). I highly appreciate your help

    Thanks!
    Kiran.

  28. Anand Vanam says:

    Hi Munish,

    Can you send me the code samples or package file for Dynamic columns mapping – Script Component as Destination (SSIS).

    Thanks in Advance

    Anand

  29. sam says:

    Hi munish,

    I am currently learning ssrs with custom data extension.

    I have downloaded a sample appln for that and worked out. it was working fine with ssrs2005.

    But when i tried with ssrs2008, it is giving error as “Could not connect to datasource. Attempted to perform an operation forbidden by CLR host”

    Why this error comes…

    Pls help me..

    Thanks & Regards
    Sam

  30. Nikhil Pereira says:

    HI,

    I would like to subscribe to your blog. request if you could sign me up for the same

    Regards
    Nikhil

  31. Pallavi says:

    Dear Munish Bansal,

    Thnx for sharing the knowledge about MultiValued Parameters.
    Pls also provide updates for SSIS.

    Rgds
    Pallavi

  32. Pallavi says:

    Dear Munish Bansal,

    Pls provide me steps for creating UDF for Multivalued Parameters in SSRS 2005

    Thnx & Rgds
    Pallavi

  33. Raquel says:

    Hi Munish,

    First of all thank you for this blog for sharing and helping everyone.
    I have a question if you can help me or anyone. Here is my question on SSRS:

    sample SSRS preview of Detail data (source: stored proc)

    StudentId TestScoreMath Course EnrollStatus
    100 200 Nursing Withdraw
    100 200 Physical Therapy Enrolled
    200 100 Database Enrolled
    —–
    Total 300

    Total Student TestScoreMath should be 300 not 400

    How can I SUM the value of MathTestScore of all distinct student in SSRS design, I cannot change the stored proc to do the calculation or grouping?

    Thank you and please help.

    Raquel

  34. Neetu Singla says:

    Hi Munish,

    I am impleminting service broker in sql server 2005 and facing the problem while creating a dialog variable.

    Given below 8 steps are working correctly but in 9th execution, i m getting the error

    “Msg 137, Level 15, State 2, Line 1
    Must declare the scalar variable “@dialog_handle”.

    Tell me where this dialog variable is being stored and how can i begin dialog conversation for adventureworks databse.

    1. CREATE MESSAGE TYPE sendMessage
    VALIDATION = WELL_FORMED_XML

    2. CREATE QUEUE sendQueue WITH STATUS = ON,
    ACTIVATION (
    PROCEDURE_NAME = sendProc,
    MAX_QUEUE_READERS = 5,
    EXECUTE AS SELF)

    3. CREATE MESSAGE TYPE sendMessage
    VALIDATION = WELL_FORMED_XML

    4. CREATE QUEUE sendQueue WITH STATUS = ON,
    ACTIVATION (
    PROCEDURE_NAME = sendProc,
    MAX_QUEUE_READERS = 5,
    EXECUTE AS SELF)

    5. CREATE CONTRACT sendContract
    (
    sendMessage SENT BY INITIATOR
    );

    6. CREATE SERVICE sendService
    ON QUEUE
    [dbo].[sendQueue] (sendContract)

    7. CREATE SERVICE initiaterService
    ON QUEUE [dbo].[sendQueue]

    8. DECLARE @dialog_handle UNIQUEIDENTIFIER;

    9. BEGIN DIALOG CONVERSATION @dialog_handle FROM
    SERVICE [sendService] TO SERVICE ‘recieveService’ ON CONTRACT [sendContract];

    10.SEND ON CONVERSATION
    @dialog_handle MESSAGE TYPE [sendMessage]
    (‘John’)

    11. END CONVERSATION @dialog_handle

    Thanks a lot in advance……………..

    Regards:
    Neetu Singla

  35. Chitvendra says:

    Hi

    I am chitvendra kumar from Delhi (India)

  36. Wence says:

    Munish, my name is Wence and I am having a problem with a script editor in Visual Studio 2005. Short note, I am using a Foreach Loop Container to read multiple delimited files then have a date flow which consists of a flat file source, script editor, and OLE DB Destination.

    I am running into a problem with the script editor. I am using VB to attempt to read the delimiter and pass along the column values to a table. I get a runtime error saying “string must be exactly one character long”.

    I tried to use a code you have posted but you were using it to convert to integer and I need to convert to string. Let me know if you can assist with this. Thank you.

    Wence

  37. Fazal says:

    Hi,munish

    I like your blog.Keep it up. good work

    Thanks

  38. Raghu says:

    Hello,

    I am using Matrix in SSRS 2008 R2. In the Matrix, in the “Row” cell, i did put “Category”field, in the “Column” cell, i did put “Description” filed and in the “Data”cell, i did put “Details” field.

    Under the “Category” field there are three categories, which are “Avg Consumption”, “Total Consumption per month”, and “Total expenditures” respectively.

    For the “Avg Consumption”, i need “Row Average” at the last cell in the row and for the “Total Consumption per month”, and “Total expenditures” i need total of the row in the last cell of the row.

    If i want to do “Row Total”, i would do by selecting “Add Total” and then “Row”. But, here my problem is bit different, that, “Avg” of the row, which must display at the end of the “Cell” for the “Avg Consumption” category , and “Total Consumption per month”, and “Total expenditures”, “total” of the row must display at the end of the “Cell”.

    Kindly please help me by providing suitable solution, you would be much appreciated.

    Thanks in advance.

  39. Nayana says:

    Hi
    I m using SSIS for the first time.
    My requirement is:
    I have to migrated data from one DB table to another.
    I have a column which will have values separated by ;(semicolon).
    I have to insert that many rows in a secondary of this main table.

    Can you please help me on this

  40. Puneet says:

    Hey Munish!
    How r u doing?
    Great Work dude…..Keep it up.
    🙂

    What is ur contact number?

    Cheers,
    Puneet Ajmera

  41. pasaks says:

    Hi,,
    I think this blog will be helpful to me in the work I have to got through…but I think I need to make my problem more clear to you to get into it..

  42. pasaks says:

    Hey bro,
    Actually nowadays I am working in a database. As you might be familiar that after developing database I have to design a form so that user can enter the datas which is to be inserted in the database..

    What I am thinking is after developing database,when working in form side…how could I get the table fields dynamically. If some column name is added later then it should automatically shown in form side,which decreases burden to adding field name in form side……..

    I am quite unfamiliar with this..so hope of getting reply asap..

    Regards
    pasaks
    Nepal

  43. pasaks says:

    hey bro,
    I really need a help from you as soon as possible….I think you can really help me out to solve my query….you can contact me on writ2ks@gmail.com….
    …please reply me asap..

    Regards
    pasaks

  44. pasaksaks says:

    Hey bro,
    Actually nowadays I am working in a database. As you might be familiar that after developing database I have to design a form so that user can enter the datas which is to be inserted in the database..

    What I am thinking is after developing database,when working in form side…how could I get the table fields dynamically. If some column name is added later then it should automatically shown in form side,which decreases burden to adding field name in form side……..

    I am quite unfamiliar with this..so hope of getting reply asap..

    Regards
    pasaks
    Nepal

  45. Nida Ozaine says:

    I couldn’t resist from commenting. Exceptionally well written!

  46. Rohit says:

    Hi Munish,

    I have a SQL table which needs to be populated from an excel file. There are 500 columns in the SQL table. But number of columns provided in excel tab are not fixed i.e 100/200/300. Here I need to make package such that excel file can be different but destination SQL will always be same and we need to map only those columns for which value is provided in Excel i.e. rest of the fields will remain null. Can you please help.

    Thanks & Regards,
    Rohit

  47. Munish – Gr8 work buddy keep it up.
    Ur blog is right up in bing search

    -Prathamesh Bhandare

  48. Pepe says:

    Hello, I need your help to fix my report with M/S report builder 3.0
    I sent you a e-mail.
    Hope you read my e-mail.
    Thank you, have a good day.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s