Click here to Skip to main content
15,915,093 members
Home / Discussions / Database
   

Database

 
AnswerRe: conn Pin
Ed.Poore3-Aug-06 23:58
Ed.Poore3-Aug-06 23:58 
Questionpersisting changes in the database. Pin
urbane.tiger3-Aug-06 16:39
urbane.tiger3-Aug-06 16:39 
AnswerRe: persisting changes in the database. Pin
Ed.Poore4-Aug-06 0:01
Ed.Poore4-Aug-06 0:01 
GeneralRe: persisting changes in the database. Pin
urbane.tiger4-Aug-06 21:36
urbane.tiger4-Aug-06 21:36 
QuestionDataSet Error: Failed to add DataTable Pin
glima3-Aug-06 11:11
glima3-Aug-06 11:11 
AnswerRe: DataSet Error: Failed to add DataTable Pin
Stephen McGuire3-Aug-06 12:54
Stephen McGuire3-Aug-06 12:54 
GeneralRe: DataSet Error: Failed to add DataTable Pin
glima3-Aug-06 18:57
glima3-Aug-06 18:57 
QuestionSyntax for update statement Pin
leckey3-Aug-06 6:42
leckey3-Aug-06 6:42 
Okay, I've been trying for a couple of hours and I can't seem to get this. No matter what I try I get 0 rows updated.

I have three tables:
1. tblParts
PartNumber
ID

2. tblLegs
AnchorBoltTemplate
PartID

3. tblAnchorTemplate
LegPartNumber
AnchorTemplatePartNumber

Part numbers have a "common name" that is a varchar (Parts.PartNumber), and a "real" ID which is Parts.ID

What I want to do is take the AnchorTemplate.AnchorTemplatePartNumber and put it in Legs.AnchorBoltTemplate

However, both fields in AnchorTemplate are the "common name" and I have to get the real PartID. I think this is part of the problem because my query doesn't know which partID I want.

This is what I have thus far:

declare @temp varchar(16)<br />
update Legs<br />
set AnchorBoltTemplate = @temp<br />
where exists<br />
(<br />
<br />
select parts.id from parts<br />
inner join anchortemplate atm on atm.legpartnumber=parts.partnumber<br />
inner join anchortemplate atm2 on atm2.LegPartNumber = parts.partnumber<br />
inner join legs on legs.partID = parts.ID<br />
where @temp = parts.id<br />
)


Does anyone see what the heck I am doing wrong???
AnswerRe: Syntax for update statement Pin
Ennis Ray Lynch, Jr.3-Aug-06 8:23
Ennis Ray Lynch, Jr.3-Aug-06 8:23 
AnswerRe: Syntax for update statement Pin
Eric Dahlvang3-Aug-06 11:38
Eric Dahlvang3-Aug-06 11:38 
QuestionHow to seperate Date and Time in SQL Pin
ChennaiBabu3-Aug-06 2:06
ChennaiBabu3-Aug-06 2:06 
AnswerRe: How to seperate Date and Time in SQL Pin
WillemM3-Aug-06 3:34
WillemM3-Aug-06 3:34 
AnswerRe: How to seperate Date and Time in SQL Pin
albCode3-Aug-06 5:20
albCode3-Aug-06 5:20 
GeneralRe: How to seperate Date and Time in SQL Pin
Jayamaruthia3-Aug-06 19:46
Jayamaruthia3-Aug-06 19:46 
GeneralRe: How to seperate Date and Time in SQL Pin
albCode3-Aug-06 20:50
albCode3-Aug-06 20:50 
AnswerRe: How to seperate Date and Time in SQL Pin
KeesVer3-Aug-06 10:31
KeesVer3-Aug-06 10:31 
QuestionBACKUP DATABASE command syntax [modified] Pin
Steven J Jowett3-Aug-06 0:53
Steven J Jowett3-Aug-06 0:53 
AnswerRe: BACKUP DATABASE command syntax Pin
seea3-Aug-06 0:57
seea3-Aug-06 0:57 
GeneralRe: BACKUP DATABASE command syntax Pin
Steven J Jowett3-Aug-06 1:17
Steven J Jowett3-Aug-06 1:17 
GeneralRe: BACKUP DATABASE command syntax Pin
WillemM3-Aug-06 3:36
WillemM3-Aug-06 3:36 
GeneralRe: BACKUP DATABASE command syntax Pin
Steven J Jowett3-Aug-06 4:12
Steven J Jowett3-Aug-06 4:12 
AnswerRe: BACKUP DATABASE command syntax Pin
Steven J Jowett3-Aug-06 4:34
Steven J Jowett3-Aug-06 4:34 
GeneralRe: BACKUP DATABASE command syntax Pin
WillemM4-Aug-06 4:17
WillemM4-Aug-06 4:17 
QuestionDistinct records problem Pin
psamy3-Aug-06 0:22
psamy3-Aug-06 0:22 
AnswerRe: Distinct records problem Pin
seea3-Aug-06 0:55
seea3-Aug-06 0:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.