Viewing 13 posts - 76 through 88 (of 88 total)
You are right. T-SQL does not like when you mix old style joins (the join definition in the where clause) and new style (join table B ON...). If you stick...
May 17, 2005 at 10:45 am
Can you break this into two stored procedures, one which is a compiled, stored procedure, which calls your dynamic sp?
If what you are passing is a very long string of...
May 17, 2005 at 8:53 am
Sorry, Lowell. Your code won't always work.
Not every table has an index with an index id (indid) of 1. You'll miss those. If an index is created, and then deleted,...
May 17, 2005 at 8:45 am
update c
set c.column1 = a.column1,
c.column2 = a.column2,
c.column3 = a.column3,
c.column4 = a.column4
from Table_C c
join Table_A a on c.columnx = a.columnx
join Table_B b on b.columnx = a.columnx
May 16, 2005 at 8:09 am
The collation sets the equality of characters.
If you must absolute distinguish between characters that SQL considers equal:
in SQL where A = a is true,
but
where convert(varbinary,'A') = select convert(varbinary,'a')...
May 13, 2005 at 11:42 am
The package runs ok from your machine, but fails when the server tries to run it. Is the server only failing when it is a scheduled job?
Have you tried to...
May 13, 2005 at 11:12 am
or you can try this.
sp_msforeachtable @command1 = 'print ''?''' ,
@command2 = 'select count (*) from ?'
sp_msforeachtable will perform up to three commands on each table in...
May 13, 2005 at 10:33 am
Warning: The previous code will NOT work if you have more than one index on a table!!!!
the sysindexes table tells you how many rows in each index, not in each...
May 13, 2005 at 10:00 am
Setting the defaults will help for new records, not for exisiting records.
run an update
update MYTABLE
set PROBLEMATIC_FIELD = 0
where PROBLEMATIC_FIELD is null
Good luck.
May 13, 2005 at 9:23 am
On most machines, TCP/IP will give faster results.
May 13, 2005 at 9:19 am
Best way to learn T-SQL? No contest. Access wins.
Use MS Access Northwind database, or connect to your own database. Using Access query wizards, to create queries, open them in the SQL view,...
May 13, 2005 at 9:17 am
Just add ten hours to the time the order was placed. That will throw it into the next day.
declare @order_date datetime
declare @deliver_date datetime
set @deliver_date = dateadd(hh, 10,...
May 13, 2005 at 9:12 am
Use the between operator. You want all values between '2003-10-24 00:00:00' and '2003-10-25 00:00:00', meaning everything that took place that day until midnight. If you are passing in...
May 11, 2005 at 9:45 am
Viewing 13 posts - 76 through 88 (of 88 total)