Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by kkielak

  1. kkielak

    Compare tables

    Let's look at sample data in the tables: 3> select * from a 4> go id atr1 atr2 loan ----------- ----------- ----------- ---- 1 1 1 2 3 3 (2 rows affected) 1> select * from b 2> go id atr1b...
  2. kkielak

    Compare tables

    Hello, I assume that table A has some id, so lets take example table A: create table A ( id int not null, atr1 int, atr2 int, loan char ) go now let's have some table B create table B ( id int not null, atr1b int, atr2b int, ) go Now you can write SP for comparing desired...
  3. kkielak

    Referencing database with '-' in the name

    the same problem can occur if table has '-' or space inside name. This syntax always works (if names does not contain any characters that are not allowed) [data base name].[owner name].[table name] alternatively you can change [ ... ] with ' ... ' notation Chris
  4. kkielak

    Denormalizing Data...

    Sunila, your code is much better (and look much more professional)... i have to work harder next time :) Chris
  5. kkielak

    Referencing database with '-' in the name

    use syntax: [data-base].dbo.table best regards Chris
  6. kkielak

    Denormalizing Data...

    ... in fact only definition of the tdist counts and stored procedure ... the rest is just copy from my notepad - sorry :). For each row in tdist you have int_c which says how many columns are populated Chris
  7. kkielak

    Denormalizing Data...

    Hello, this is simple and 'dirty' solution for your problem using stored procedure instead of insert into denormalized table ... maybe it will help best regards Chris create table t ( id varchar(10), a int ) go insert into t values('A',1) insert into t values('A',2) insert into t...
  8. kkielak

    SQL Query error

    Hello, can't you use DATEDIFF(MI,....) to get time difference in minutes. Look in BOL Chris
  9. kkielak

    why are my physical export files fragmented?

    GDM8, i've heard that Defragmentation of NTFS included in Windows 2k is very poor - If you run the third party tool on the "defragmented" disk it still has a lot of work to do - maybe that's an issue here best regards Chris
  10. kkielak

    Selecting from different table base on parameter

    I did somethig like this > create procedure ttt > @a int, > @b bit >as >begin > > create table #t ( > idd int > ) > > if @b=1 > print "test1" > else > print "test2" >end and it works like this > exec ttt 1,1 gives test1 > exec ttt 1,2 gives test2 I think you...
  11. kkielak

    Using "If exsists" statement to drop a table with a variable name

    Are you runnig if exists in context of master database? best regards Chris

Part and Inventory Search

Back
Top