oops, working in too many languages...
replicate of course
where right( phone_no, 3 ) = repeat( right( phone_no, 1 ), 3 )
I thought SQL's implementation of ADSI was limited to 1000 rows unless changed server side using ntdsutil.exe since sql doesn't allow you to...
is the SQL service running under a domain account with permissions on the target machine?
I'd guess that when using a cursor it has to create the temporary table in order to not confuse the cursor? not 100% sure... as a row gets updated...
to be honest I think that the mistake here is to use a cursor at all...?
Id try something like
insert into product_identifier_xref(...
For a simple assignment to a variable this makes no difference though... the variable will have the last value in the result set as sorted by the...
generally this is done using
select top 3
from ( select top 5 col, col2, col3 from table order by col desc ) t
order by col asc
could you not use
select top 3 @empid = empid from emp order by salary desc
in a function
to give the the third highest paid employee.
be aware that places like Google and Yahoo not only spend millions on their technology, they also don't use a SQL database for their...
IS NULL is a way for searching specifically for NULLS,
= is an equality operator, and in SQL NULL does not equal NULL since it is 'undefined'...
same sort of thing but matching on company name instead of ticker symbol. would seem an odd thing to do though as compnay name is too long for...
it depends on whether your application puts all statements for a single transaction into a single SQL call. This would be preferred for...
statistics have been updated on the database?
SELECTp.HNID, p.HN, p.Names, p.Surname
WHEREp.Gender = 1
Select p.HNID,p.HN,p.Names, p.Surname
FROM Patient INNER JOIN...
select top 1 destination,hotel,SUM(sold) from INV group by destination,hotel order by SUM(sold) DESC
oh man I did it in a hurry...
I did say "something like" which means I could have left in the error intentionally (but I didn't)
Also try to run each part of the UNION statement seperately, to see if there is one of those areas causing the problem, rather than trying to tackle...
The user will by default have guest access to master and msdb databases when they have a valid SQL logon. This is irrespective of the level of...
select sum( case when date_entered between '20050101' and '20050131' then sales_amount else 0 end ) -
sum( case when date_entered between...
Separate names with a comma.