Viewing 15 posts - 196 through 210 (of 327 total)
Maybe this can get you started. I'm sure someone else can come up with a more elegant solution.
IF EXISTS (SELECT name
FROM sysobjects
WHERE name = N'tblCategory'
AND...
May 7, 2005 at 2:59 pm
Can't say that I know for sure which is the most efficient but if I were to explicity convert to datetime in this type of situation, I would not bother to convert...
May 7, 2005 at 10:58 am
While we're at it why not get rid of the convert statement it seems to work fine for me without it.
update Inventory
set DateColumn = DateStringColumn
where isdate(DateStringColumn) = 1
May 6, 2005 at 8:55 pm
For an excellent article on how to work with sql server dates read this article by Frank Kalis:
http://www.sql-server-performance.com/fk_datetime.asp
May 6, 2005 at 8:44 pm
Select a.AgendaId, a.AgendaItem,
c1.FullName as ProposedBy,
c2.FullName as SecondedBy
From tblAgenda a
Join tblContacts c1
On c1.ContactId = a.ProposedBy
Join tblContacts c2
On c2.ContactId = a.SecondedBy
May 6, 2005 at 11:20 am
Here's the example from Books Online but even this doesn't work when I test it!?
This example uses CHAR(13) to print name, address, and city information on separate lines, when the...
May 5, 2005 at 1:11 pm
Here's a good article on case sensitive comparisons
http://www.databasejournal.com/features/mssql/article.php/3487696
May 5, 2005 at 9:46 am
select refno from SABPP.SABPP_CRMCLT
Where refno not LIKE 'A%' ....
May 5, 2005 at 9:24 am
I don't think this will work when col_1 is null and @DateSubmitted is null. In such a case you will be left with the expression
Where Null = NUll and...
May 4, 2005 at 5:45 pm
If you are still having a problem please post the exact statement you are trying to run, a sample of the output and why you think it is not correct.
May 4, 2005 at 2:53 pm
Select Min(InvoiceDate)
From your_table
Where product_id = '123'
-------------------------------------
Select top 1 InvoiceDate
From your_table
Where product_id = '123'
Order by InvoiceDate
May 4, 2005 at 2:48 pm
Sliu,
Remi is correct. If you are still using such an approach to dates then do yourself a big favor and read the article mentioned above by Frank Kalis.
May 4, 2005 at 1:15 pm
SELECT *
FROM MyTable
WHERE SubDate BETWEEN '01/03/2005 00:00:00' AND '31/03/2005 23:59:59'
Even this statement will miss rows with a date of 31/03/2005 23:59:59 containing milliseconds > 000.
For a excellent understanding of how...
May 4, 2005 at 11:17 am
I think this will work fine for you.
Where ...(@DateSubmitted Is NUll OR col_1 = @DateSubmitted)
May 4, 2005 at 8:42 am
SELECT Distinct m.clrec_sysid, m.cons_entity_id, m.event_date
FROM tblclinical_reord_master m
WHERE m.clrec_sysid =
(SELECT Top 1 m2.clrec_sysid
FROM tblclinical_record_master m2
JOIN tblcase c on m2.case_sysid = c.case_sysid
WHERE m2.cons_entity_id = m.cons_entity_id
AND c.case_end_date Is Null
ORDER BY m2.event_date...
May 3, 2005 at 6:15 pm
Viewing 15 posts - 196 through 210 (of 327 total)