Pages

Google Analytics Alternative

Search This Blog

Monday, December 6, 2010

SQL - ISO Country Names and Codes

SQL - ISO Country Names and Codes
This document provides the necessary SQL statements for ISO 3166 country names and two and three letter codes. This page and the data are in UTF-8 encoding.

Create Country Table



Table is called base_country as it follows Edoceo naming conventions, change as necessary. This is for a PostgreSQL database, CREATE TABLE statements may need to be altered for your RDBMS.

create table base_country (
id integer primary key,
iso2 char(2),
iso3 char(3),
name_en varchar(64),
name_fr varchar(64),
name_de varchar(64)
);




Create indexes as necessary, which may not be as this table is so small.

Insert the Country Data



This SQL should work on any SQL-99 compliant RDBMS.





INSERT INTO base_country (id, iso2, iso3, name_en, name_fr) VALUES (1, 'AF', 'AFG', 'Afghanistan', NULL);
INSERT INTO base_country (id, iso2, iso3, name_en, name_fr) VALUES (2, 'AX', 'ALA', 'Åland Islands', NULL);
INSERT INTO base_country (id, iso2, iso3, name_en, name_fr) VALUES (4, 'DZ', 'DZA', 'Algeria (El Djazaïr)', NULL);
INSERT INTO base_country (id, iso2, iso3, name_en, name_fr) VALUES (3, 'AL', 'ALB', 'Albania', NULL);
INSERT INTO base_country (id, iso2, iso3, name_en, name_fr) VALUES (5, 'AS', 'ASM', 'American Samoa', NULL);
INSERT INTO base_country (id, iso2, iso3, name_en, name_fr) VALUES (6, 'AD', 'AND', 'Andorra', NULL);
INSERT INTO base_country (id, iso2, iso3, name_en, name_fr) VALUES (7, 'AO', 'AGO', 'Angola', NULL);
INSERT INTO base_country (id, iso2, iso3, name_en, name_fr) VALUES (8, 'AI', 'AIA', 'Anguilla', NULL);
INSERT INTO base_country (id, iso2, iso3, name_en, name_fr) VALUES (9, 'AQ', 'ATA', 'Antarctica', NULL);
INSERT INTO base_country (id, iso2, iso3, name_en, name_fr) VALUES (10, 'AG', 'ATG', 'Antigua and Barbuda', NULL);
INSERT INTO base_country (id, iso2, iso3, name_en, name_fr) VALUES (11, 'AR', 'ARG', 'Argentina', NULL);
INSERT INTO base_country (id, iso2, iso3, name_en, name_fr) VALUES (12, 'AM', 'ARM', 'Armenia', NULL);
INSERT INTO base_country (id, iso2, iso3, name_en, name_fr) VALUES (13, 'AW', 'ABW', 'Aruba', NULL);


Tuesday, November 23, 2010

Sql StoredProcedure Optimization Tips

We will go over how to optimize Stored Procedure with making simple changes in the code. Please note there are many more other tips, which we will cover in future articles.
  • Include SET NOCOUNT ON statement: With every SELECT and DML statement, the SQL server returns a message that indicates the number of affected rows by that statement. This information is mostly helpful in debugging the code, but it is useless after that. By setting SET NOCOUNT ON, we can disable the feature of returning this extra information. For stored procedures that contain several statements or contain Transact-SQL loops, setting SET NOCOUNT to ON can provide a significant performance boost because network traffic is greatly reduced.

CREATE PROC dbo.ProcName
AS
SET NOCOUNT ON;
--Procedure code here
SELECT column1 FROM dbo.TblTable1
-- Reset SET NOCOUNT to OFF
SET NOCOUNT OFF;
GO 


Sunday, November 14, 2010

Command-line Building With csc.exe

Command-line Building With csc.exe

You can invoke the C# compiler by typing the name of its executable file (csc.exe) on the command line. If you use the Visual Studio Command Prompt (available as a shortcut on the start menu under Visual Studio Tools), all the necessary environment variables are set for you. Otherwise, you must adjust your path in order to enable csc.exe to be invoked from any subdirectory on your computer. If you do not use the Visual Studio Command Prompt, you must run vsvars32.bat to set the appropriate environment variables to support command line builds. For more information about vsvars32.bat, see How to: Set Environment Variables.


If you are working on a computer that only has the Windows Software Development Kit (SDK), you can use the C# compiler at the command line if you use the SDK Command Prompt, which is available from the Microsoft .NET Framework SDK menu option.

You can also use MSBuild to programmatically build C# programs. For more information

The csc.exe executable is usually located in the Microsoft.NET\Framework\ folder under the system directory. Its location may vary depending on the exact configuration on any individual computer. Multiple versions of this executable will be present on the computer if more than one version of the .NET Framework is installed on the computer. For more information about such installations, see Determining Which Version of the .NET Framework Is Installed.

Rules for Command-Line Syntax for the C# Compiler

________________________________________
The C# compiler uses the following rules when it interprets arguments given on the operating system command line:
• Arguments are delimited by white space, which is either a space or a tab.
• The caret character (^) is not recognized as an escape character or delimiter. The character is handled by the command-line parser in the operating system before it is passed to the argv array in the program.
• A string enclosed in double quotation marks ("string") is interpreted as a single argument, regardless of white space that is contained within. A quoted string can be embedded in an argument.
• A double quotation mark preceded by a backslash (\") is interpreted as a literal double quotation mark character (").
• Backslashes are interpreted literally, unless they immediately precede a double quotation mark.
• If an even number of backslashes is followed by a double quotation mark, one backslash is put in the argv array for every pair of backslashes, and the double quotation mark is interpreted as a string delimiter.
• If an odd number of backslashes is followed by a double quotation mark, one backslash is put in the argv array for every pair of backslashes, and the double quotation mark is "escaped" by the remaining backslash. This causes a literal double quotation mark (") to be added in argv

Sample Command Lines for the C# Compiler


________________________________________

• Compiles File.cs producing File.exe:
           csc File.cs
• Compiles File.cs producing File.dll:
          csc /target:library File.cs
• Compiles File.cs and creates My.exe:
          csc /out:My.exe File.cs
• Compiles all the C# files in the current directory, with optimizations on and defines the DEBUG symbol. The output is File2.exe:
          csc /define:DEBUG /optimize /out:File2.exe *.cs
• Compiles all the C# files in the current directory producing a debug version of File2.dll. No logo and no warnings are displayed:
          csc /target:library /out:File2.dll /warn:0 /nologo /debug *.cs
• Compiles all the C# files in the current directory to Something.xyz (a DLL):
          csc /target:library /out:Something.xyz *.cs

Differences Between C# Compiler and C++ Compiler Output

Differences Between C# Compiler and C++ Compiler Output
--------------------------------------------------------------------------------
There are no object (.obj) files created as a result of invoking the C# compiler; output files are created directly. As a result of this, the C# compiler does not need a linker.

Friday, November 12, 2010

how to enable instance using sp_configure

hi friends,
i find too many issues while attaching any database file in asp..net project
so for that use the below command for enable instance configuration in your sqlExpress

sp_configure  'user instances enabled', 1; RECONFIGURE

Wednesday, November 3, 2010

Computer on rent in Gandhinagar

sunrise computer
sec-24
Reference by Vikaram Sagar Candid computer
contact number
sivrambhai 9427055568,
nanjibhai 9408474313

P-3 on 400Rs.
P-4 on 600Rs.
Core 2 dual on 800



laxmi info
sec-21
Reference by Mr.Drumil Kanani (Niral's old room mate )
hareshbhai 9825332949
P-4 on 1200
P-3 on 800

Sunday, October 24, 2010

Jquey with Webservice in asp.net


how to call webservice from JQuery

please find following steps

Please find following steps for

  • Create one WebService in asp.net project with DummyTest.asmx


  • [WebService(Namespace = "http://tempuri.org/")]
  • [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
  • [System.ComponentModel.ToolboxItem(false)]



  • Create one Webmethod with SessionEnable = true

[Webmethod(EnableSession=true)]
Public string HelloWorld(string name)
{
//apply your logic here
Return “Hello World” + name;
}


  • Come to aspx page and add jQuery Library at top of the page

<script languge=”javascript” src=”jquery-1.3.2.js” ></script>
<script languge=”javascript” src=”jquery-ui-1.7.2.min.js” ></script>


  • ajax method parameters

Type: “Post” or “Get”
URL : your web service file name /Method name
Data : paramert data for webmethod
contentType: "application/json; charset=utf-8"
dataType: "json"
success : function
error : function

Thursday, September 30, 2010

SQL SERVER – Simple Example of Recursive CTE

Recursive is the process in which the query executes itself. It is used to get results based on the output of base query. We can use CTE as Recursive CTE (Common Table Expression). You can read my previous articles about CTE by searching at http://search.SQLAuthority.com .

Here, the result of CTE is repeatedly used to get the final resultset. The following example will explain in detail where I am using AdventureWorks database and try to find hierarchy of Managers and Employees.
USE AdventureWorks
GO
WITH Emp_CTE AS (
SELECT EmployeeID, ContactID, LoginID, ManagerID, Title, BirthDate
FROM HumanResources.Employee
WHERE ManagerID IS NULL
UNION ALL
SELECT e.EmployeeID, e.ContactID, e.LoginID, e.ManagerID, e.Title, e.BirthDate
FROM HumanResources.Employee e
INNER JOIN Emp_CTE ecte ON ecte.EmployeeID = e.ManagerID
)
SELECT *
FROM Emp_CTE
GO

In the above example Emp_CTE is a Common Expression Table, the base record for the CTE is derived by the first sql query before UNION ALL. The result of the query gives you the EmployeeID which don’t have ManagerID.

Second query after UNION ALL is executed repeatedly to get results and it will continue until it returns no rows. For above e.g. Result will have EmployeeIDs which have ManagerID (ie, EmployeeID of the first result). This is obtained by joining CTE result with Employee table on columns EmployeeID of CTE with ManagerID of table Employee.

This process is recursive and will continue till there is no ManagerID who doesn’t have EmployeeID.

Thursday, September 9, 2010

Using ASP.NET MVC 2 to Query Twitter's Public API - FIFA 2010



Using ASP.NET MVC 2 to Query Twitter's Public API - FIFA 2010

If you've been living under a rock for the last few years, you might not have heard of Twitter, but for the rest of us, it is a great communication tool. I have made countless friends with it including the authors of DotNetCurry! Thankfully Twitter has a public Application Programming Interface (API) which you can use and incorporate into your site, if you'd like to add Twitter feeds to it. This article demonstrates how to do it using ASP.NET MVC.
To see this in action, I'm going to create a small ASP.NET MVC 2 website. If you haven't got Microsoft Visual Studio 2010, you can download the Express edition here.
To begin with, let's take a look at the Twitter's API. The documentation is here, but for a brief overview, here's what you can do:
- search
- trends
- trends/current
- trends/daily
- trends/weekly
I'm going to be using the search API to search Twitter. Search returns tweets in two formats, json and atom. I'll be using the atom format for my code. Let's get started!
The tweet returned from Twitter will be in atom format, but I don't want to mess with that! I want a POCO object to play with, so I've created a class calledTwitterViewData to store the tweets. Here's the class:

C#
public class TwitterViewData
{
public string AuthorName { get; set; }
public string AuthorUri { get; set; }

public string Content { get; set; }
public string Updated { get; set; }
public string Link { get; set; }
}
VB.NET (10.0)
Public Class TwitterViewData
Public Property AuthorName() As String
Public Property AuthorUri() As String
Public Property Content() As String
Public Property Updated() As String
Public Property Link() As String
End Class

That being done I'm next going to tackle the view. I need to make a web request to search for tweets. Thankfully making a web request in ASP.NET is simple. Once the data is returned, I'll use a LINQ query to transform the data to my TwitterViewData class and pass that to the view. Here's the action code below:
C#
public ActionResult Index()
{
var request = WebRequest.Create("http://search.twitter.com/search.atom?q=worldcup&rpp=5") as HttpWebRequest;
var twitterViewData = new List<TwitterViewData>();
if (request != null)
{
using (var response = request.GetResponse() as HttpWebResponse)
{
using (var reader = new StreamReader(response.GetResponseStream()))
{
var document = XDocument.Parse(reader.ReadToEnd());
XNamespace xmlns = "http://www.w3.org/2005/Atom";
twitterViewData = (from entry in document.Descendants(xmlns + "entry")
select new TwitterViewData{
Content = entry.Element(xmlns + "content").Value,
Updated = entry.Element(xmlns + "updated").Value,
AuthorName = entry.Element(xmlns + "author").Element(xmlns + "name").Value,
AuthorUri = entry.Element(xmlns + "author").Element(xmlns + "uri").Value,
Link = (from o in entry.Descendants(xmlns + "link")
where o.Attribute("rel").Value == "image"
select new { Val = o.Attribute("href").Value }).First().Val
}).ToList();
}
}
}
return View(twitterViewData);
}

VB.NET
Public Function Index() As ActionResult
Dim request = TryCast(WebRequest.Create("http://search.twitter.com/search.atom?q=worldcup&rpp=5"), HttpWebRequest)
Dim twitterViewData = New List(Of TwitterViewData)()
If request IsNot Nothing Then
Using response = TryCast(request.GetResponse(), HttpWebResponse)
Using reader = New StreamReader(response.GetResponseStream())
Dim document = XDocument.Parse(reader.ReadToEnd())
Dim xmlns As XNamespace = "http://www.w3.org/2005/Atom"
twitterViewData = (From entry In document.Descendants(xmlns + "entry")
Select New TwitterViewData With {.Content = entry.Element(xmlns + "content").Value, .Updated = entry.Element(xmlns + "updated").Value, .AuthorName = entry.Element(xmlns + "author").Element(xmlns + "name").Value, .AuthorUri = entry.Element(xmlns + "author").Element(xmlns + "uri").Value, .Link = (From o In entry.Descendants(xmlns + "link")Where o.Attribute("rel").Value = "image"
Select New With {Key .Val = o.Attribute("href").Value}).First().Val}).ToList()
End Using
End Using
End If
Return View(twitterViewData)
End Function

The code above is pretty self explanatory. I'm making a web request to the API via the following line of code:
var request = WebRequest.Create("http://search.twitter.com/search.atom?q=worldcup&rpp=5") as HttpWebRequest;
From there I parse the atom string into an XDocument type so it's super easy to query.
var document = XDocument.Parse(reader.ReadToEnd());
Next I'm using LINQ to XML to query the data and return the query as a list of TwitterViewData types. That list is passed as the model to the view.
The view as always is quite simple. Here it is:
If you run the application, you'll get the latest searches on the 2010 FIFA world cup from Twitter. This is a cool way of interacting with Twitter. In an upcoming article I'll show you how to do this without ASP.NET.

Thursday, August 5, 2010

important web link for jQuery Ajax

hi please find new link which will help us to make developer task very smooth..

GridView Confirmation Box Using JQuery BlockUI

http://www.highoncoding.com/Articles/562_GridView_Confirmation_Box_Using_JQuery_BlockUI.aspx

jQuery $(document).ready() and ASP.NET Ajax asynchronous postback
http://blog.dreamlabsolutions.com/post/2009/02/24/jQuery-document-ready-and-ASP-NET-Ajax-asynchronous-postback.aspx

http://runtingsproper.blogspot.com/2009/07/using-comparevalidator-to-check-input.html

Using a CompareValidator to check input is a valid date
http://www.dotnetspark.com/links/116-jquery-date-picker-implementation-asp-net.aspx

http://www.regonline.com/register/checkin.aspx?EventId=841136

http://joshsmithonwpf.wordpress.com/2007/05/05/binding-a-treeview-to-a-dataset/

Tuesday, August 3, 2010

Hidden Stored Procedure in SqlServer

List of hidden Stored procedure in Sqlserver..

NameFunction
sp_cursorUpdate a cursor
sp_cursorcloseclose a cursor
sp_cursorexecuteOpen a prepared cursor
sp_cursorfetchFetch rows
sp_cursoropenOpen a cursor
sp_cursoroptionSet cursor options
sp_cursorpreparePrepare a cursor statement
sp_cursorprepexecPrepare a cursor statement and open
sp_cursorunprepare Free a prepared cursor statement
sp_executeExecute a prepared statement
sp_preparePrepare an SQL statement
sp_prepexecPrepare and execute an SQL statement
sp_unprepareFree a prepared statement

Sp_cursoropen


Defines the attributes of an API server cursor, such as its scrolling behavior and the statement used to build the result set on which the cursor operates, then populates the cursor. The statement can contain embedded parameters.

Syntax

sp_cursoropen [@cursor =] cursor_handle OUTPUT,
[@stmt =] 'stmt'
[, [@scrollopt =] scroll_options OUTPUT]
[, [@ccopt =] concurrency_options OUTPUT]
[, [@rowcount =] rowcount OUTPUT]

[
{, [@paramdef =] N'parameter_name data_type [,...n]' }
{, [@param1 =] value1 [,...n] }

]

Arguments
[@cursor =] cursor_handle OUTPUT
Is the name of a declared integer variable to receive the cursor handle. cursor_handle is int, with no default.
[@stmt =] 'stmt'
Is a string containing a single SELECT statement or a single stored procedure call. The size of the string is limited only by available database server memory. stmt can contain parameters having the same form as a variable name, for example:
'SELECT * FROM Employees WHERE EmployeeID = @IDParameter'
Each parameter included in stmt must have a corresponding entry in both the @paramdef parameter definition list and the parameter values list.
[@scrollopt =] scroll_options OUTPUT
Is the cursor scroll type. scroll_options is int with a default of 1 (keyset-driven), and can be a combination of these values (exactly one of the first 5 must be specified).
ValueDescription
0x0001Keyset-driven cursor.
0x0002Dynamic cursor.
0x0004Forward-only cursor.
0x0008Static cursor.
0x0010Fast forward-only cursor.
0x1000Parameterized query.
0x2000Auto fetch.
0x4000Auto close.
0x8000Check acceptable types.
0x10000Keyset-driven acceptable.
0x20000Dynamic acceptable.
0x40000Forward-only acceptable.
0x80000Static acceptable.
0x100000Fast forward-only acceptable.
On return, @scrollopt contains the type of cursor actually created, which may not match what was requested.
[@ccopt =] concurrency_options OUTPUT
Is the cursor concurrency. concurrency_options is int, with a default of 4 (optimistic) and can be a combination of these values (exactly one of the first 4 must be specified).
ValueDescription
0x0001Read-only.
0x0002Scroll locks.
0x0004Optimistic. Checks timestamps and, when not available, values.
0x0008Optimistic. Checks values (non-text, non-image).
0x2000Open on any SQL.
0x4000Update keyset in place.
0x10000Read-only acceptable.
0x20000Locks acceptable.
0x40000Optimistic acceptable.
On return, @ccopt contains the type of cursor actually created, which may not match what was requested.
[@rowcount =] rowcount OUTPUT
Is the name of a declared integer variable to receive the number of affected rows. rowcount is int with no default value.
[@paramdef =] N'parameter_name data_type [,...n]'
Is one string that contains the definitions of all parameters that have been embedded in stmt. Each parameter definition consists of a parameter name and a data type. n is a placeholder indicating additional parameter definitions. Every parameter specified in stmt must be defined in @paramdef. If the Transact-SQL statement in stmt does not contain parameters, @paramdef is not needed. The default value for this parameter is NULL.
[@param1 =] value1
Is a value for the first parameter defined in the parameter string. The value can be a constant or a variable. There must be a parameter value supplied for every parameter included in stmt. The values are not needed if the Transact-SQL statement in stmt has no parameters.
n
Is a placeholder for the values of additional parameters. Values can be only constants or variables. Values cannot be more complex expressions such as functions, or expressions built using operators.

Return Code Values
0 (success) or 1 (failure).
Result Sets
Returns the result set generated by stmt, but containing no rows.
Remarks
sp_cursoropen is a more powerful (and programmatic) way of creating server-side cursors on SQL Server.
Permissions
Execute permissions default to the public role.
Examples

A. Create a cursor for a simple SELECT statement

This simple example creates a dynamic read-only cursor for a SELECT statement with no parameters.

USE pubs
-- Create a dynamc read-only cursor
DECLARE @cursor INT
EXEC sp_cursoropen @cursor OUTPUT, N'SELECT * FROM myTable', 2, 8193
-- Close the cursor
EXEC sp_cursorclose @cursor


B. Create a cursor for a parameterized SELECT statement

This example creates a dynamic read-only cursor for a SELECT statement with 2 parameters.
USE pubs
-- Create a dynamc read-only cursor
DECLARE @cursor INT
EXEC sp_cursoropen @cursor OUTPUT, N'SELECT * FROM myTable WHERE col1=@P1 AND col2 LIKE @P2', 2, 8193, N'@P1 INT, @P2 VARCHAR(255)', 10, '%x%'
-- Close the cursor
EXEC sp_cursorclose @cursor


C. Create a cursor for a stored procedure call

This example creates a dynamic read-only cursor for a stored procedure with 2 parameters (the procedure must return only one result set or the cursor creation will fail). Note that output parameters can also be used and return values retrieved via output parameters.

USE pubs
-- Create a dynamc read-only cursor
DECLARE @cursor INT
DECLARE @retval INT
EXEC sp_cursoropen @cursor OUTPUT, 'EXEC @P1=myProc @P2', 2, 8193, N'@P1 INT OUTPUT, @P2 INT', @retval, 1
-- Close the cursor
EXEC sp_cursorclose @cursor


sp_cursorfetch


Fetches a row or block of rows from an API server cursor.

Syntax

sp_cursorfetch [@cursor =] cursor_handle [, [@fetchtype =] fetchtype]
[, [@rownum =] rownum OUTPUT]
[, [@nrows =] nrows OUTPUT]

Arguments

[@cursor =] cursor_handle
Is the cursor handle. cursor_handle is int, with no default.
[@fetchtype =] fetchtype
Is the fetch type. fetchtype is int, with a default of 2 and can have one of these values.
ValueDescription
0x0001First row.
0x0002Next row.
0x0004Previous row.
0x0008Last row.
0x0010Absolute row index.
0x0020Relative row index.
0x0040By value (???).
0x0080Refresh.
0x0100Result set info.
0x0200Previous noadjust (?).
0x0400Skip update concurrency (???).
[@rownum =] rownum OUTPUT
Is the row number. rownum is int, with a default of NULL.
[@nrows =] nrows OUTPUT
Is the number of rows to fetch. nrows is int, with a default of NULL (fetch all rows).

Return Code Values
0 (success) or 1 (failure).

Result Sets
Returns the requested row or group of rows from the cursor.
Remarks

In addition to fetching rows, the 'result set info' fetch type can be used to retrieve information about the cursor (current row in @rownum and total number of rows in @nrows).

Permissions

Execute permissions default to the public role.

Example
USE pubs
-- Create a dynamc read-only cursor
DECLARE @cursor INT
EXEC sp_cursoropen @cursor OUTPUT, 'SELECT * FROM myTable', 2, 8193
-- Fetch the next 3 lines
EXEC sp_cursorfetch @cursor, 2, 0, 3
-- Close the cursor
EXEC sp_cursorclose @cursor

Find job in Ahmedabad with the help of Consultancy Services

Vruksham Consultancy
contact Person : NA
contact No : 98255 06759

Contact person : Jagruti
Contact No : 98248 90808

Contact person : NA
Contact No : +91 79064501704

Fortune Consultancy
Contact person : NA
Contact No : +91 92274 00814

Alak malak Consultancy
Contact person : Miss Prachi desai
Contact No : +91 98980 75556

Call Candid
Contact person : NA
Contact No : +91 7930129266

Global Consultancy
Contact person : NA
Contact No : +91 98252 31005
+91 98982 27622
+91 93752 31005

AHM Consultancy
Contact person : NA
Contact No : +91 79 40034229

jobs@prakashinfotech.com


Yashoda Kamble - 090330 90001
Hiranand Chawla - 096015 51234

Email Id:- http://draft.blogger.com/

WEB:- http://draft.blogger.com/

Coral Futures A – 303, Ganesh Plaza,
Nr. Navrangpura Post Office,
Navrangpura, Ahmedabad -380 009.
Gujarat, India.
Phone: +91 - 79 - 32441921.

NicheTech Solutions Pvt. Ltd
AHMEDABAD
Contact Details
NicheTech Solutions Pvt. Ltd.
TF-23, Shukan Mall, Nr. Rajasthan Hospital
Shahibaug, Ahmedabad. 380004 Gujarat, India

Phone : +91-79-65423194, 30220292
Email : info@nichetechsolutions.com

Ms. Nita Zaveri (Chair Person & Managing Director)
Suner Complex, TF-16, 3rd Floor ,Harinagar Crossing, Rajesh Tower Road, Gotri, Vadodara 390 021, Gujarat (INDIA).
Mobile : + 91-93272 10477 (For Client Companies Only)
Landline : +91-265-2387674 (For Candidates)
E-mail : nidhiplacements@yahoo.co.in
E-mail : nidhiplacements3@gmail.com,
(For Candidates)
nidhiplacements@nidhiplacements.com
(For Client Companies Only)

Directi Placement
Email :  vedika.b@directi.com

Location                                                         Contact

1 UNIQUE BUILDING,                              6544405, 3053244,
ASTRON CHOWK,                                   9925043211,9510210111
OPP PARTH HOSPITAL,                          CONTACT PERSON
SARDARNAGAR MAIN RD,                         MR YOGESH PATEL
Rajkot -360001                                  Email: truejobconsultant@gmail.com

Hunch Consultant
404 Supath,
Opp Rasranjan,
Vijay Cross Road
Ahmedabad-380009
(O) 079-26402728 (M) 09714993550
Email : inquiry@hunchconsultant.com

Job consultancy
Vandana  :  +91 9227551411

Job Guru @ rajkot

+91 9227615012

Mehul Amin  (9825009364)Recruitment ConsultantCareer Mosaic (ISO 9001-2000 Certified)
701, Suyojan, Nr. Hotel President, 
Off. C G Road, Ahmedabad-380009
Tel: +91 079 40073004/5/6 
staffing@careermosaic.org
www.careermosaic.org

Friday, July 30, 2010

Difference between Stuff and Replace

What is STUFF and Replace. Differece between them.

Stuff ::
The STUFF function inserts a string into another string. It deletes a specified length of characters in the first string at the start position and then inserts the second string into the first string at the start position.

Syntax :
STUFF (character_expression , start , length ,character_expression )
Usage in Real life Example :
SELECT STUFF('abcdef', 2, 3, 'ijklmn');
GO
Output ::
----------------------------------------------------------------------------------------
aijklmnef
(1 row(s) affected)
Command Highlights :
Arguments
--------------------------------------------------------------------------------

Automate the Generation of Stored Procedures for Your Database

Level of Difficulty 1 2 3
SUMMARY
Design-time automation makes coding faster and ensures that all the procedures generated use the same naming conventions and structure. In an effort to improve their coding efficiency in a large SQL project, the authors wrote a set of design-time stored procedures that generate run-time stored procedures, and have used them in project after project ever since. Recently, the authors updated their procedures to make use of SQL Server 2000 features, including user-defined functions.