all groups > sql server programming > july 2007 > threads for saturday july 7
Filter by Day: 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
where first letter = ?
Posted by Middletree at 7/7/2007 11:05:09 PM
I cannot seem to find anything in the Help or BOL about how to do to a
select which would return rows if one of the fields has data which starts
with a particular letter. Of course, I could use LIKE:
select firstname, lastname
from contact
where lastname like (B*)
But I'm thinking that w... more >>
ultimate check if a db is online / ready ?
Posted by NewToSql at 7/7/2007 6:53:58 PM
Hi,
in case the db is online (in sys.databases) but one of its files has issues,
the query (in the Try block) simply fails and the error is no caught in the
Catch block.So how to check if a database is in working condition? and/ or
how to catch errors such as this one (level 24)?
Thanks
---... more >>
Creating new databases comment
Posted by Paul at 7/7/2007 6:13:48 PM
For sql express 2005, if I try to create a database with smo it fails
with the error code 1802 if the mdf file exists but is not currently
attached. This appears normal to me, I don't know I didn't write sql
server. If the file is attached I delete it first using smo, no problem.
I need to ... more >>
COALESCE Query Issues
Posted by Nightcrawler at 7/7/2007 3:14:35 PM
I have the following query:
SELECT Employee, WorkTitleId, CountryId, StateId, EmployeeTypeId
FROM Employees
WHERE WorkTitleId = COALESCE(@WorkTitleId, WorkTitleId)
AND CountryId = COALESCE(@CountryId, CountryId)
AND StateId = COALESCE(@StateId, StateId)
AND EmployeeTypeId = COALESCE(@Emp... more >>
Ignore time in DateTime COALESCE query
Posted by Nightcrawler at 7/7/2007 1:09:56 PM
How can I get this query to ignore the time part of the DateHired
(datetime) parameter.
SELECT Employee, City, DateHired
FROM Employees
WHERE Employee = COALESCE(@Employee, Employee)
AND City = COALESCE(@City, City)
AND DateHired = COALESCE(@DateHired, DateHired)
Thanks
... more >>
How to prevent the client see Sql Statements from SQL Profiler?
Posted by ABC at 7/7/2007 12:00:00 AM
How to prevent the client see Sql Statements from SQL Profiler?
As a IT solutions providers, it is need to protect the source code. As the
project has many stored procedures and will install to client side. For
prevent the client looking and copying the source code from SQL Profiler
when ... more >>
|