Thanks for the help Alex. Here's my final statement which seems to be working perfectly.
-- Temporary Table Creation
CREATE TABLE ac (row_id INT NOT NULL IDENTITY(1,1) ,color_desc VARCHAR(150),results int)
INSERT INTO ac (color_desc,results)
select description,count(description) as count
from...
I think that has helped alot Alex, however that leaves me with my DELETE statement
DELETE FROM color
WHERE color NOT IN (SELECT TOP 1 color FROM color
INNER JOIN animal_colors on color.description = animal_colors.color
WHERE color.[description] = animal_colors.color AND...
updated script:
CREATE TABLE animal_colors(row_id INT NOT NULL IDENTITY(1,1) ,color VARCHAR(50))
INSERT INTO animal_colors (color)
SELECT
[description]
FROM
color
DECLARE @i INT
DECLARE @row_count INT
SET @i = 1
SET @row_count = (SELECT MAX(row_id) FROM animal_colors)
WHILE @i < @row_count...
the declare of type table was supposed to be a way to create a temp table instead of using CREATE TABLE and having to drop it at the end. That part works great, same results as doing this:
CREATE TABLE animal_colors(
row_id int NOT NULL IDENTITY(1,1),
color varchar(50)
)
INSERT INTO...
r937,
This might make a little more sense. Still getting the errors from above. Basically the statement should get the distinct values from one table, then create a temp table with auto_incremented rows.
Once that is done it will check another table where the column matches the color field of...
Here is the error that I am getting:
Msg 137, Level 15, State 2, Line 16
Must declare the scalar variable "@animal_colors".
Msg 137, Level 15, State 2, Line 22
Must declare the scalar variable "@animal_colors".
Here is my SQL Statement:
go
declare @animal_colors table (color varchar(50))...
I currently downloaded DBDesigner4, looks like it might work so far.
lespaul, I know i have looked at Dezign for DB a long time ago, and couldn't for the life of me remember the name of the program. I may have to revisit that one as well.
Thanks for the help everyone!
Shawn
Are there any good programs out there for database design/layout?
Anything that might work better than sheet after sheet of paper getting laid out on a desk?
Free would be good, but still would like to know about others.
Thanks
Shawn
SQLBill.
I am learning both. The reason I made the post in this forum is for SQL not MySQL.
SQLDenis.
Pretty sure it'll be T_SQL.
I definitely think I have a few good sources to run with now, I just wanted to stop by here to see if there was any "definitive" work for learning SQL.
Thanks...
I have learned some MySQL for some web based applications that I have needed, so I am familiar with the basic querying code.
However I have accepted a new position that will have it in my best interest to learn full blown SQL programming and concepts.
I'm subscribed to the MySQL forums as...
Thanks Alex,
My other question, is, what do you generally look for in a "reference" guide for SQL. Are you looking for something that has the complete inner workings of SQL, something that has an explanation and examples of coding, or both?
Thanks again,
Shawn
I have a "working" knowledge of MySQL and some new circumstances are requiring me to learn full blow SQL. Are there any good recommendations on books or websites regarding SQL programming.
Thanks!
Shawn
I do have some experience, and it's what I would think would be pretty good experience to get me in the door at an entry level helpdesk or net administrator type position, however my job titles have never revolved around computers. Is there a good way to demonstrate this on a resume to give...
The only "working" experience I have with networking is that I was the guy to upgrade and maintain our old systems to a WIN2000 Server and Workstation environment. Even though my actual position and title were much different.
I also have non-work related experience setting up an entire small...
Evening,
Looking for a few useful pointers out there. I just recently picked up my A+ cert, and I am looking to wedge my way into the IT field somehow. I've always had the experience with the systems (building, troubleshooting, hardware, software, networking), but have not to this point tried...
Evening,
Looking for a few useful pointers out there. I just recently picked up my A+ cert, and I am looking to wedge my way into the IT field somehow. I've always had the experience with the systems (building, troubleshooting, hardware, software, networking), but have not to this point tried...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.