Question : SQL 2008 query unique identifier for data trasnfer

Hi All,
Please help on following query

I need to transfer data between 2 tables -  from Table  [CDRFull].[dbo].[CDRFull] to Table [CDRFull].[dbo].[BILLING.DEFAULT]. The attached example bellow is working, but i have duplications of reccords every single time when this query runs. Ive posted this previosly and for the time being this query was working. I wold like to do the following:

common element between both tables is the column called : callsessionid (not in the example bellow) . I have this reccord as non-repetative and wold be a realy nice if i can use it as unique identifier that will prevent duplications. Any recommendations and sugestions are welcomed.

Thanks in advance!

the previos working example
.............
INSERT INTO [CDRFull].[dbo].[BILLING.DEFAULT]
(ALERTING_TIME, CALLING_NUMBER, CONNECT_TIME, CREATION_TIME, DISCONNECT_TIME, CALLED_NUMBER)
SELECT ALERTING, CALLINGNUM, CONNECT, CREATION, DISCONNECT ,ORIGINALCALLEDNUMBER
FROM (SELECT * FROM [CDRFull].[dbo].[CDRFull]
WHERE ALERTING<> '1970-01-01 00:00:00'AND CONNECT<> '1970-01-01 00:00:00')

Answer : SQL 2008 query unique identifier for data trasnfer

(a.)  Just means that you don't have to put static in front of an inner interface.  It can always be referenced, while an inner class will produce compile-time errors if it's used outside of the classes unless it's static.  See first code snippet attached.

(b.) This seems to be false, as I can do the following without any errors:

class MyClass1 {
      public static class MyInnerClass1 {
            public static int a = 0;

            public static void method() {
            }
      }
}

public class WhiteMage {
      public static void main(String[] args) {
            MyClass1.MyInnerClass1.a = 45;
            MyClass1.MyInnerClass1.method();
      }
}
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
class MyClass1 {
	public static interface MyInnerInterface1 {
	}

	public interface MyInnerInterface2 {
	}

	public static class MyInnerClass1 {
	}

	public class MyInnerClass2 {
	}
}

//no errors
class MyClass2 implements MyClass1.MyInnerInterface1,MyClass1.MyInnerInterface2 {
}

/**
 *
 * @author WhiteMage at http://www.experts-exchange.com/
 */
public class WhiteMage {
	public static void main(String[] args) {
		MyClass1.MyInnerInterface1 a = new MyClass2(); //no error
		MyClass1.MyInnerInterface2 b = new MyClass2(); //no error
		MyClass1.MyInnerClass1     c = new MyClass1.MyInnerClass1(); //no error

		//ERROR!
		MyClass1.MyInnerClass2     d = new MyClass1.MyInnerClass2();
	}
}
Random Solutions  
 
programming4us programming4us