Viewing 15 posts - 106 through 120 (of 124 total)
Just in case anyone is interested:
My query using all of the derived tables took 1 hour, 13 minutes to run.
Mark's query using the group/having clause took 14 minutes,...
January 25, 2008 at 10:04 am
Unfortunately, I believe that query will give me all customers in the database. I specifically need to find customers that have invoices in 2003, 2004, 2005, 2006 and 2007.
So,...
January 25, 2008 at 8:15 am
Fabio,
Thanks for your input and your concern.... who knows, maybe later down the line there will be some problem I am not cognizant of now?
The problem was...
January 16, 2008 at 1:09 pm
Ok, in developing the code to convert all of the database tables that contain the FLOAT datatype fields to VARCHAR datatype fields, I discovered a solution to the initial QUERY...
January 15, 2008 at 3:19 pm
Thanks everyone for your inputs!
Grant, I am impressed you were able to find that BOL entry. Either I am still not familiar enough with how to query BOL for...
January 15, 2008 at 7:46 am
Unfortunately, it is not that easy. 🙁
I tried to do LIKE '8810657712' and LIKE '8810657712%' and LIKE '%8810657712%', none of which worked.
I also did a different query on the...
January 14, 2008 at 11:45 am
Tony,
Thanks for the input! I did consider creating a temp table (perhaps @temp or @@temp) to store the 3000+ values, run the bcp queries, then drop the table.
However,...
December 21, 2007 at 8:19 am
Steve,
Thanks for the reply. I figured this would be a bit confusing; the "inner" select statement needs to contain all 3000 items. Basically, the criteria needs to be
bcp...
December 20, 2007 at 3:17 pm
I found a website today that describes variable usage, http://www.sqlis.com/81.aspx .
However, when I have three "columns" of data coming in, index 0, 1, 2, (for the Column1,...
December 13, 2007 at 8:51 am
WOOO HOOOO! It worked! Much better than "brute force"! Just goes to show that collaboration is much better than going it alone!
I can say, if not for this website,...
July 27, 2007 at 7:40 am
Thanks for everyone's responses again! I think there might be a misunderstanding... In the initial query, I am converting any "CompanyNames" from NULL to "Not Assigned".
If the initial CompanyName...
July 26, 2007 at 6:57 am
Could not figure out a way to use the CASE statement in the where clause (thanks for all those who contributed), so I decided a little coding was in order...
July 25, 2007 at 2:59 pm
I found the problem... not enough quote(s) around the statement. The statement I was trying to use was:
SET @SelectStmt = 'AND AccountNo LIKE ''%'+@SelectStmt+''''
I was so concerned about...
May 21, 2007 at 6:28 am
No... it is a single datetime column... I just need to find the earliest date (min(MyDates)) and latest date (max(MyDates)) to see how much data is in the table. The...
May 18, 2007 at 12:31 pm
Actually, you are right... I could have just done a SELECT to set the variable:
Declare @DateVar varchar(10)
Declare @NewDate varchar(20)
Declare @Statement nvarchar(2000)
Set @DateVar = convert(varchar(11),(getdate()-5), 20)
...
May 16, 2007 at 12:15 pm
Viewing 15 posts - 106 through 120 (of 124 total)