Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
programer
Posting Yak Master
221 Posts |
Posted - 2010-08-05 : 12:45:14
|
| How do I define string?string strUser = UserIdWHERE tbl_Payments.UserId = tbl_PaymentDetails.UserId = strUser.Please help.thanks. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
programer
Posting Yak Master
221 Posts |
Posted - 2010-08-05 : 13:00:10
|
quote: Originally posted by programer How do I define string?string strUser = UserIdWHERE tbl_Payments.UserId = tbl_PaymentDetails.UserId = strUser.Please help.thanks.
1st Users:The first table I've UserId = 4w40208488443283 PrimarykeyIn the other tables I've UserId = 4w40208488443283 Primarykey2nd Users:The first table I've UserId = 4443243243432rwr PrimarykeyIn the other tables I've UserId = 4443243243432rwr PrimarykeyHow to display data according to login?thanks |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
programer
Posting Yak Master
221 Posts |
Posted - 2010-08-05 : 13:16:24
|
quote: Originally posted by tkizer I still don't understand what you are asking.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog
Here is a problem: WHERE tbl_Payments.UserId = '" + strUserId + "' and tbl_PaymentsDetails.UserId = '" + strUserId + "' Error:The multi-part identifier "tbl_PaymentsDetails.UserId" could not be bound. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: The multi-part identifier "tbl_PaymentsDetails.UserId" could not be bound.Please help!thanks |
 |
|
|
programer
Posting Yak Master
221 Posts |
Posted - 2010-08-05 : 13:17:27
|
quote: Originally posted by programer
quote: Originally posted by tkizer I still don't understand what you are asking.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog
Here is a problem: WHERE tbl_Payments.UserId = '" + strUserId + "' and tbl_PaymentsDetails.UserId = '" + strUserId + "' Error:The multi-part identifier "tbl_PaymentsDetails.UserId" could not be bound. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: The multi-part identifier "tbl_PaymentsDetails.UserId" could not be bound.Please help!thanks
resolved my problem: PaymentsDetails.UserId |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|
|