Viewing 15 posts - 1 through 15 (of 77 total)
Hi - Post the actual table name and the actual column names in your "TableA".
Then I can show you how to get eliminate the dupes in your big...
April 24, 2008 at 6:32 am
You can eliminate duplicates in Table A with SQL statement:
SELECT col1, col2, col3, col4, col5, col6, col7
GROUP BY col1, col2, col3, col4, col5, col6, col7
This will return all unique...
April 23, 2008 at 10:45 am
To correct your specific error: Must declare the scalar variable "@dbname",
change your code as shown below.
set @sql =
'select p.sa_property_id, z.zipcode as sa_site_zip, z.state as sa_site_state, z.city as...
August 14, 2006 at 8:42 am
Hello Steve Hirsch - I also traverse between DB worlds. Here are SQL Server equivalents to your Oracle query; for this simple a query they work the same.
SELECT a.field, b.field
January 5, 2006 at 3:01 pm
Both the article and the comment by Lutz Albers were enlightening.
When I ran into this problem, I would solve it like this:
LEFT OUTER JOIN
(SELECT * FROM...
January 5, 2006 at 6:09 am
Hmm. The Join to Employee Territories is a red herring. You're only updating the Employee table:
SET dbo_Employees.LastName = "Leverling2"
If you were trying to profile a joined update,...
January 2, 2006 at 8:43 am
I like the idea of using variables instead of the quotes. But not the part about the ASCII characters. The solution below works best for me:
Declare @q char(1)
Set @q =...
November 15, 2005 at 8:06 am
I agree - the article was great.
One link does work: http://tech.rssgroup.com/shapes/
Re: "The accompanying download includes the binary and configuration files necessary to experiment with shapes on your own." ...
October 27, 2005 at 6:22 am
DECLARE @val CHAR(20), @v2 CHAR(40)
select LEN(@val), LEN(@v2)
SET @val = ' SSC is cool '
SET @v2 = @val + @val
And this, for a different, non-intuitive result:
DECLARE @val nvarchar(20),...
August 26, 2005 at 7:50 am
Using your table [TbTimes], you can run a CrossTab Query to get 1 line for each rider.
Heading Line: Rider Distance1 Distance2 ... etc, on colum for each distance
Data line 1:...
January 21, 2005 at 7:11 am
There are some critical differances between crosstab and rotate:
A. Rows: Crosstab creates 1 row of output for 1 or more rows of input.
Rotate creates 1 row of output for...
January 11, 2005 at 5:07 am
This query has got to be for presentation (i.e. a report or a web screen), yes? If so, what's the target presentation app? I'd try to do it there,...
January 10, 2005 at 10:01 pm
Hello Luis Santos,
I agree with Antares686, a sample output -- particularly of the two lines that you want consolidated into 1 -- would make this easier to solve. However, I'll...
January 10, 2005 at 9:25 pm
Hello J M Davis,
You can also tell SQL to calculate the derived column before the join, by putting the selections for table2 in a sub-select:
January 10, 2005 at 8:58 am
The parsing-names problem has existed since names have been automated. I don't think it's susceptible to a technology quick-fix. Typical name data may include: honorific titles (DR., etc.), hyphenated...
December 31, 2004 at 12:12 pm