Viewing 15 posts - 556 through 570 (of 598 total)
select * from table
where LOWER(RIGHT(RTRIM(COL_A),3)) = 'ing'
--RTRIM to eliminate any trailing blanks
--LOWER to take care of case issues
Or simpler:
select * from table
where COL_A LIKE '%ing'
Test for efficiency, but the...
April 27, 2006 at 9:32 am
For the count, use:
Select count (1) from tbl where...
It's generally slightly more efficient.
April 27, 2006 at 9:03 am
What is it that you want to show?
If you want to show only data where there are matches, use inner join.
Select
a.Col1, a.Col2, b.Col1, b.Col2, b.Col3
from tableA a
INNER JOIN tableB b
on a.Col1...
April 26, 2006 at 4:42 pm
The devil is in the details...
If it's a calculated column, you have to use aliasing.
So...
select au_id, au_lname, au_fname
into #AS_Discussion
from dbo.authors
select * from #AS_Discussion
drop table #AS_Discussion
works
BUT
select au_id,
au_lname + ',...
April 26, 2006 at 12:03 pm
Sure, just stuff the SQL into a varchar variable, then run exec SQL. See here:
http://msdn2.microsoft.com/en-us/library/ms188332(SQL.90).aspx
so the above would look something like:
USE somedatabase
Declare @sqlstr varchar(250)
set @sqlstr =...
April 26, 2006 at 11:51 am
John's hit my favorite sites, besides this one. There are a ton of articles here on SSC that speak to standards and practices. Here's a few of my favorites:
April 26, 2006 at 11:40 am
Agreed. You should at least have a disclaimer up front saying the "article" was written by a Sonasoft executive...
Very disappointed.
April 26, 2006 at 11:20 am
From where are you getting the e-mails?
At minimum, you could do something like this perhaps:
Declare @email varchar(75)
set @email = 'email1'
INSERT INTO @tempEmail (email_address, DisplayName, P.ProjectID, OrganizationID, type)
April 25, 2006 at 1:15 pm
At minimum, you need to set a default value like this:
@SearchTitle nvarchar(255) = NULL,
April 25, 2006 at 1:08 pm
Have you seen this article?
http://www.sqlservercentral.com/columnists/jsack/sevenshowplanredflags.asp
What do the tables look like? What does the query look like?
One thing you might want to consider is creating temporary tables with indexes, populating...
April 25, 2006 at 8:52 am
Ouch.
Any chance you could use a parsing app prior to the BCP to take care of the control character?
Is the table structure exactly the same? If so, you could potentially create...
April 25, 2006 at 8:44 am
What do you mean by "append date to the table"?
If you simply want to update the table from which you are extracting data, a simple SQL call (there's a DTS...
April 25, 2006 at 7:01 am
If it's a direct import with no translations of any kind needed, you're probably better off with a bulk copy.
See here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_impt_bcp_2e5s.asp
for reference.
April 25, 2006 at 6:57 am
I don't know about faster. While I haven't done any clocking, I have used DTS extensively and haven't really noticed that.
I do know that most prefer to avoid DTS in...
April 24, 2006 at 6:20 pm
Where are you looking that you're not seeing the new schedule? If it's the EM jobs view, it's probably just a refreshing issue.
April 24, 2006 at 1:28 pm
Viewing 15 posts - 556 through 570 (of 598 total)