Skip to main content

Posts

Showing posts from 2011

How to Transferring Data from One Table to Another

Transferring Data from One Table to Another with query  Larsen Every DBA needs to transfer data between tables. This is the kind of task that comes up all the time. Not only do DBAs need to know how to transfer data between two tables on the same server, but they will also need to know how to do it from one server to another. This article will look at a number of different methods to transfer data from one table to another. The INSERT INTO Method This method, as the heading suggests, uses the INSERT INTO T-SQL statement to move records from one table to another. This method is one of the easiest methods of transferring data. This method can not only be done between tables on the same server, but can also be done across servers. To use this method, all you have to do is code an INSERT INTO statement that identifies the target table, and uses a SELECT statement to identify the data you want to copy from the source table. Let me show you an example. Say you have two tables TABLE1

Google Maps using in asp.net

http://en.googlemaps.subgurim.net/ejemplos/ejemplo_95000_Iconos.aspx http://gathadams.com/2007/08/21/add-google-maps-to-your-net-site-in-10-minutes/ https://developers.google.com/maps/documentation/javascript/events http://gmaps.codeplex.com/

Pl/SQl Examples

http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/overview.htm#LNPLS001 pivot example http://www.kodyaz.com/articles/t-sql-pivot-tables-in-sql-server-tutorial-with-examples.aspx

bcp command

http://www.simple-talk.com/sql/database-administration/working-with-the-bcp-command-line-utility/ Export: bcp testdb.dbo.TBL_BOOKINGS out C:\sqlbackup\test8.txt -S ipadress/servername -U sa -P password -n Import: bcp testdb.dbo.TBL_BOOKINGS in C:\sqlbackup\test8.txt -S ipadress/servername -U sa -P password -n

Error 29506 when installing SQL Server 2005 Management Studio Express on Vista/windows7

Fix this issue by doing like this. 1. Under ‘Accessories’ from ‘All Programs’, right-click the Command Prompt shortcut and select ‘Run as Administrator’. Accept the UAC warning when prompted. 2. From the command prompt change to the directory that holds the SSMSEE installation .MSI file. 3. Enter the command .\SQLServer2005_SSMSEE_x64.msi if you’re running Vista x64 /windows7(64-bit) or .\SQLServer2005_SSMSEE.msi if you’re running Vista x86 (32-bit) 4. Press enter and complete the installation as normal.

sql cache dependancy

http://msdn.microsoft.com/en-us/library/ms178604.aspx http://davidhayden.com/blog/dave/archive/2006/04/29/2929.aspx http://davidhayden.com/blog/dave/archive/2006/04/29/2929.aspx http://www.dotnetspider.com/resources/18424-Using-SQLCacheDependency-Class-ASP-Net-SQL.aspx http://www.wrox.com/WileyCDA/Section/Using-the-ASP-NET-2-0-SQL-Server-Cache-Dependency.id-306459.html troubleshooting-sqlcachedependency http://developmenttips.blogspot.com/2009/01/troubleshooting-sqlcachedependency-in.html checking broker was enabled or not select is_broker_enabled from sys.databases where database_id=db_id() creating end points: USE master; CREATE ENDPOINT BrokerEndpoint STATE = STARTED AS TCP ( LISTENER_PORT = 4022 ) FOR SERVICE_BROKER (AUTHENTICATION = WINDOWS) GO use SAIDASARI; ALTER DATABASE SAIDASARI SET ENABLE_BROKER; Identifying running queries sp_Who killing running process kill 55

Give Me Answer

I using System.DateTime.Now to get current date time this process was good my application was in India server ,when uploaded to Us server there is a time difference so i want to get India time format How can India DateandTime In(dotnet technologies)

Example

OpenNETCF provide a class that will allow you access to the contants on the sim card. Below is a small example of code that you could use :- Code Snippet OpenNETCF.Phone.Sim.Sim test = new OpenNETCF.Phone.Sim.Sim(); foreach (OpenNETCF.Phone.Sim.PhonebookEntry entry in test.Phonebook) { string name = entry.Text; string phoneNumber = entry.Address; }

Getting contacts from mobile

You have to choose Windows Mobile application( install WM 5.0 SDK, or WM 6.0 SDK). If you need any information regarding Windows mobile. Here you can find use ful links , including videos. Check the link http://social.msdn.microsoft.com/Forums/en-US/microsoftdeviceemu/thread/8dc5bbff-efbc-40b0-bb62-5fd470c93223/?prof=required To retrieve the phone contacts: http://social.msdn.microsoft.com/Forums/en-US/netfxcompact/thread/b4d9989f-301f-48c7-9f50-ad1d54b7ec3b To retrieve SIM contacts: http://social.msdn.microsoft.com/forums/en-US/vssmartdevicesvbcs/thread/b9db04b7-236c-4588-b00e-ea930ad4f113/ http://msdn.microsoft.com/en-us/library/ms839358.aspx Please let me know if you have any queries regarding this.

Gridview with calendar

How To Add calendar control inside a GridView using System;using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security;using System.Web.UI; using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls; public partial class CalInsideGridView : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { GridView1.DataSource = GetCustomMadeDataTable(); GridView1.DataBind(); } } public DataTable GetCustomMadeDataTable() { //Create a new DataTable object System.Data.DataTable objDataTable = new System.Data.DataTable(); //Create three columns with string a

Droping All Tables and Procedures ,Functions ,keys

/* Drop all non-system stored procs */ DECLARE @name VARCHAR(128) DECLARE @SQL VARCHAR(254) SELECT @name = (SELECT TOP 1 [name] FROM sysobjects WHERE [type] = 'P' AND category = 0 ORDER BY [name]) WHILE @name is not null BEGIN SELECT @SQL = 'DROP PROCEDURE [dbo].[' + RTRIM(@name) +']' EXEC (@SQL) PRINT 'Dropped Procedure: ' + @name SELECT @name = (SELECT TOP 1 [name] FROM sysobjects WHERE [type] = 'P' AND category = 0 AND [name] > @name ORDER BY [name]) END GO /* Drop all views */ DECLARE @name VARCHAR(128) DECLARE @SQL VARCHAR(254) SELECT @name = (SELECT TOP 1 [name] FROM sysobjects WHERE [type] = 'V' AND category = 0 ORDER BY [name]) WHILE @name IS NOT NULL BEGIN SELECT @SQL = 'DROP VIEW [dbo].[' + RTRIM(@name) +']' EXEC (@SQL) PRINT 'Dropped View: ' + @name SELECT @name = (SELECT TOP 1 [name] FROM sysobjects WHERE [type] = 'V' AND category = 0