Wednesday 15 February 2023

How to insert BULK data using SQL Server ?

 HOW TO INSERT BULK DATA INTO TABLE 

How to insert bulk data into table sql

SQL SERVER BULK INSERT

in this Article, you’ll learn how to use the SQL Server BULK INSERT statement to import a data file into a database table.

Using BULK INSERT statement you can insert data into table or views.

Basic syntax for bulk inserts.

BULK INSERT tablename

FROM path_to_file

WITH options;

 

Before loading data into table or views you should have must csv file with data.

BULK INSERT Employees

FROM 'D:\data\employees.csv'

WITH (

  FIELDTERMINATOR = ',',

  ROWTERMINATOR = '\n',

  FIRSTROW = 2

);

In this statement:

The table name is Employees. If you connect to the master database, you need to specify the full table name like HR.dbo.Employees

The path to the data file is D:\data\employees.csv.

The WITH clause has three options: The comma (,) as the FIELDTERMINATOR, which is a separator between columns. The newline ('\n') as the ROWTERMINATOR, which separate between rows. 

Finally, query the data from the Employees table:

SELECT * FROM employees;

 What is cursor in sql server ?

what is stored procedure in sql server?

what is CTE in sql server ?

SQL interview question and answer?

 

 


Thursday 2 February 2023

RSMSSB Informatics Assistant Recruitment 2023 Notification Out For 2730 Posts

 

RSMSSB Informatics Assistant Recruitment 2023 Notification Out For 2730 Posts

Informatic Assistant 2023

Hello friends Technical book always give you precise information about any vacancy. No need to provide extra content which are not relevant to you so please find each and every detail which are important of you.

How to Apply:

Apply through SSO Profile or click on below link.

https://sso.rajasthan.gov.in/signin


RSMSSB IA Recruitment 2023 Out

The online applications for the RSMSSB Informatics Assistant Recruitment 2023 will commence from 27th January 2023 and will last on 25th February 2023. To apply for RSMSSB Informatics Assistant Recruitment 2023, Candidates must refer to this article to know all the important details regarding RSMSSB IA Recruitment 2023. So read the full article to check all the recruitment information and bookmark this website for further Engineering Job Updates.

 

RSMSSB Informatics Assistant Recruitment 2023 Overview

Recruitment Authority

Rajasthan Subordinate and Ministerial Services Selection Board

Post Name

Informatics Assistant

Number of Vacancies

2730

Apply Online Start

27th January 2023

Apply Online End

25th February 2023

Job Location

Rajasthan

Selection Process

Written Exam | Typing Test(English + Hindi)

 20 W.P.M

RSMSSB Official Website

https://rsmssb.rajasthan.gov.in

           

Click here to download RSMSSB Informatics Assistant Recruitment 2023 Notification PDF

 Download Notification

As per RSMSSB Suchna Sahayak Recruitment 2023 Notification, a total of 2730 vacancies are announced. The category-wise vacancy distribution for RSMSSB Informatics Assistant 2023 is mentioned below.

RSMSSB Informatics Assistant Vacancy Details 2023

Category

Vacancy

For Non-TSP Area

(2415 Posts)

 

General/ UR

1140

 

EWS.

241

OBC

169

 

EBC

123

 

SC

300

 

ST

427

 

Baran District (Sahariya Tribe Candidates)

15

For TSP Area

(315 Posts)

 

General/ UR

195

 

SC

15

 

ST

105

 

                                                               

RSMSSB Informatics Assistant Recruitment 2023 Eligibility Criteria

The candidates who want to apply for RSMSSB Informatics Assistant Recruitment 2023 must fulfill the requisite qualification given under the official notification. The detailed eligibility criteria for RSMSSB IA Recruitment 2023 are mentioned below:

Educational Qualification

The minimum qualification required for the RSMSSB Informatics Assistant Vacancy 2023 is as follows:

Diploma/Degree in Computer Science/ IT /Electronics and Communication from a government recognized University/Institute with

Age Limit

Candidates willing to apply for RSMSSB Informatics Assistant Recruitment 2023 must have an age limit as under.

 Minimum Age – 21 Years

Maximum Age – 40 Years

Age Relaxation is applicable as per the Government Norms

RSMSSB Informatics Assistant Application Fees 2023

The category-wise application fee details for RSMSSB Informatics Assistant Recruitment 2023 are tabulated here. The applicants can pay the application fees online mode.

Category

Application Fees

 

General/OBC (Other State)

Rs. 450/-

 

OBC (Non-Creamy Layer)

Rs. 350/-

 

SC/ST/PWD

Rs. 250/-

 

                                           

RSMSSB Informatics Assistant Selection Process 2023

The RSMSSB Informatics Assistant selection process includes the following stages as mentioned below:

Written Exam

Typing Test

Document Verification

 

 

How to save dynamically added rows in MVC

 

How to save dynamically added rows in MVC

This article shows How to add dynamically rows on button click event and save all the data into database using asp.net mvc

Here we are performing this problem using below example with detailed description.

 

 

 

 

 

 

 

 

 

 

 

 

 

Time In

Time Out

 

 

 

 

__________

___________

Add New

 

 

 

__________

___________

Add New

 

 

 

 

 

 

 

 

 

Save

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

In

Out

Duration

Action

 

 

09:30

12:30

03:00

Delete

 

 

13:00

16:30

03:30

Delete

 

 

16:45

19:00

02:15

Delete

 

 

 

 

 

 

 

 

In Hours

Out Hours

First In

Last Out

 

 

08:45

00:45

09:30

19:00

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Here is the problem statement.

When you click on the “Add New” Button, it should generate a new row for the time entry below the existing one. Users should be able to add as many entries he/she wants to add.

Clicking on Save, all those entries should be saved in the database and should be displayed in the below grid with proper Duration, In Hours, Out Hours, First In & Last Out values.

Clicking on Delete should ask for confirmation “Are you sure you want to delete?”. If the user says Yes, that entry should be deleted and update all calculated fields.

Please find Below steps :

1. Create Database Table :

CREATE TABLE [dbo].[TimeEntryDetail](

[TimeEntryId] [int] IDENTITY(1,1) NOT NULL,

[InTime] [time](7) NOT NULL,

[OutTime] [time](7) NOT NULL,

[Duration] [time](7) NOT NULL,

2. Add  Using Database First Approach Data model in your application. 

namespace Test.Models

{

    using System;

    using System.Collections.Generic;

    using System.ComponentModel.DataAnnotations;

     public partial class TimeEntryDetail

    {

        public int TimeEntryId { get; set; }

         [Display(Name ="In")]

        public System.TimeSpan InTime { get; set; }

        [Display(Name = "Out")]

        public System.TimeSpan OutTime { get; set; }

        public System.TimeSpan Duration { get; set; }

    }

}

3. Add following code to view to add dynamic rows using jquery.

@model IEnumerable<Test.Models.TimeEntryDetail>

@using Test.Models

@{

    ViewBag.Title = "Create";

}

    <table id="tblTimeEntry" class="table" cellpadding="0" cellspacing="0">

        <thead>

            <tr>

                <th style="width:150px">Time In</th>

                <th style="width:150px">Time Out</th>

                <th></th>

            </tr>

        </thead>

        <tbody>

            @*@foreach (TimeEntryDetail timedetail in Model)

            {

                <tr>

                    <td>@timedetail.InTime</td>

                    <td>@timedetail.OutTime</td>        

                </tr>

            }*@

        </tbody>

        <tfoot>

            <tr>

                <td><input type="time" id="txtInTime" /></td>

                <td><input type="time" id="txtOutTime" /></td>

                <td><input type="button" id="btnAdd" value="Add New"  class="btn btn-primary" /></td>

            </tr>

        </tfoot>

    </table>

    <br />

    <input type="button" id="btnSave" value="Save" class="btn btn-success" />

    <br /><br />

    @Html.ActionLink("Go to Time Entries", "Detail")

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>

    <script type="text/javascript" src="http://ajax.cdnjs.com/ajax/libs/json2/20110223/json2.js"></script>

    <script type="text/javascript">

        function validEntry()

        {

            var In = $("#txtInTime").val();

            var Out = $("#txtOutTime").val();

            if (In == "" || Out == "") {

                alert("Please valid In and Out Entry both");

                return false;

            }

            else { return true;}

        }

        $("body").on("click", "#btnAdd", function () {

            if (validEntry() == true) {

                var txtInTime = $("#txtInTime");

                var txtOutTime = $("#txtOutTime");

                var tBody = $("#tblTimeEntry > TBODY")[0];

                var row = tBody.insertRow(-1);

                var cell = $(row.insertCell(-1));

                cell.html(txtInTime.val());

                cell = $(row.insertCell(-1));

                cell.html(txtOutTime.val());

                txtInTime.val("");

                txtOutTime.val("");

            }

        });


        $("body").on("click", "#btnSave", function () {

                var timeDetails = new Array();

                $("#tblTimeEntry TBODY TR").each(function () {

                    var row = $(this);

                    var timedetail = {};

                    timedetail.InTime = row.find("TD").eq(0).html();

                    timedetail.OutTime = row.find("TD").eq(1).html();

                    timedetail.duration = (new Date(timedetail.OutTime) - new Date(timedetail.InTime));

                    timeDetails.push(timedetail);

                });

            //Send the JSON array to Controller using AJAX.

            $.ajax({

                type: "POST",

                url: "/TimeEntry/Create",

                data: JSON.stringify(timeDetails),

                contentType: "application/json; charset=utf-8",

                dataType: "json",

                success: function (r) {

                    alert(r + " Entry(s) Added into Timesheet");

                }

            });

        });

    </script>


4. Add below following code to Controller. 

        [HttpPost]

        public JsonResult Create(List<TimeEntryDetail> timeentrydetails)

        {

           using (DB_TechAvidusEntities db = new DB_TechAvidusEntities())

            {

                if (timeentrydetails == null)

                {

                    timeentrydetails = new List<TimeEntryDetail>();

                }

                foreach (TimeEntryDetail detail in timeentrydetails)

                {

                    db.TimeEntryDetails.Add(detail);

                }

                int insertedRecords = db.SaveChanges();

                return Json(insertedRecords,JsonRequestBehavior.AllowGet);



            }

        }