Viewing 15 posts - 15,331 through 15,345 (of 15,381 total)
check out suser_name() function.
April 20, 2009 at 1:06 pm
That is roughly clear as mud however the where clause you posted sounds like it should work...
((@type = A and table.A like 'abc%') or (@type = C and table.A like...
April 20, 2009 at 1:00 pm
Assuming that @type is the value you want it is just type = @type
April 20, 2009 at 12:03 pm
I think you will find that it doesn't gain you any performance. int.parse() and .tostring() are very efficient. I would be more concerned that you now have a dictionary. (are...
April 20, 2009 at 8:38 am
I think the confusion is that sql converts '' to 1/1/1900. If you need to use this date and also have "blank" try inserting null instead of ''. If this...
April 17, 2009 at 2:50 pm
Basically, I would write a cursor to loop through all the rows. Do a control break type logic such that you stick the AccountName in a variable. Start by initializing...
April 17, 2009 at 10:18 am
Upgrade to 2005. 😛
You are probably going to have to do this row-by-row. :sick:
I can probably find some time later today to come up with a rough idea if you...
April 17, 2009 at 9:52 am
There is certainly a better way to do this but you could probably use the
sys.tables where create_date > @LastSyncDate or modify_date > @LastSyncDate
to get a list of tables.
Then...
April 17, 2009 at 9:17 am
Are you saying the structure of your production databases changes daily? :w00t: That sounds a little scary. Maybe you should look into something like doing a backup of prod and...
April 17, 2009 at 8:41 am
Yes it is very normal (even normalized :-P) to have several foreign key relationships to any given table. If you have time I would defintely recommend catching up on some...
April 16, 2009 at 2:55 pm
At a glance I don't see anything wrong with this trigger. The record in the original table is not really gone yet. It is in the middle of a transaction...
April 16, 2009 at 2:33 pm
These should be foreign keys. Think of hard it will be if you store the program name in multiple tables and the name of the program changes. :w00t: What if...
April 16, 2009 at 2:25 pm
JacekO (4/16/2009)
My solution has a simpler execution plan and lower query cost so it might perform faster. But of course both them work and it's your call. 🙂
I agree....
April 16, 2009 at 1:41 pm
Try this and this if this gets you what you want. I included my create and insert scripts too. 😉
create table Account
(
Accountname varchar(50),
Booknumber int,
Bookname varchar(50)
)
insert account select 'StoreOne',...
April 16, 2009 at 12:50 pm
Glad that worked for you. Let me know if you need some more help on it and I will see what I can do. 😀
April 16, 2009 at 8:05 am
Viewing 15 posts - 15,331 through 15,345 (of 15,381 total)