Click here to Skip to main content
15,899,679 members
Home / Discussions / Database
   

Database

 
AnswerRe: SQL Server Pin
Colin Angus Mackay20-Sep-06 2:31
Colin Angus Mackay20-Sep-06 2:31 
QuestionI cannot retrive the field value Pin
vicky0000019-Sep-06 21:56
vicky0000019-Sep-06 21:56 
QuestionSql to Excel Pin
minniemooo19-Sep-06 21:31
minniemooo19-Sep-06 21:31 
AnswerRe: Sql to Excel Pin
_AK_19-Sep-06 21:39
_AK_19-Sep-06 21:39 
Questionright alignment of data Pin
kodulkar_nilesh19-Sep-06 20:58
kodulkar_nilesh19-Sep-06 20:58 
QuestionSQL Server Query Help (Trying to compare two tables and display the nonmatching records Pin
choorakkuttyil19-Sep-06 20:12
choorakkuttyil19-Sep-06 20:12 
AnswerRe: SQL Server Query Help (Trying to compare two tables and display the nonmatching records Pin
Michael Potter20-Sep-06 5:11
Michael Potter20-Sep-06 5:11 
QuestionDatatype conversion in a SQL statement - need help Pin
Slow Learner19-Sep-06 2:38
Slow Learner19-Sep-06 2:38 
Hello ,

Here is the SQL I am trying to run against our database.

*****************************************************
SELECT * FROM Part WHERE (Company_Abrv = 'TSBI')
AND (Catalog_PartType = 'Component')
AND (TypeName = 'Generic')
AND (Version = 'Space Holder')
AND (KeyComponentName = 'SPACER')
AND ( Part_Number IN (SELECT Part_Number FROM PartAttributes
WHERE (TypeName = 'Generic')
AND (Version = 'Space Holder')
AND (KeyComponentName = 'SPACER')
AND (AttributeName = 'Inside Diameter'
AND AttributeValue <= 18))
********************************************************

the last part of the WHERE clause AttributeValue is a Varchar type column. But as we are building the SQL query dynamically we also might get integer values at times. So our query may look like the above.

So in this case I am trying to convert the AttributeValue column as an int or decimal type when it has a numerical or a decimal value.


so I am trying to do it like 'convert(decimal,AttributeValue) <= 18' but it doesn't accept it.

could some one please help me with how do I do it?

Thanks
-Learner
AnswerRe: Datatype conversion in a SQL statement - need help Pin
albCode19-Sep-06 4:42
albCode19-Sep-06 4:42 
QuestionDifference between SqlCommand and SqlCommandBuilder Pin
param thaker19-Sep-06 2:30
param thaker19-Sep-06 2:30 
AnswerRe: Difference between SqlCommand and SqlCommandBuilder Pin
Kschuler19-Sep-06 10:57
Kschuler19-Sep-06 10:57 
GeneralRe: Difference between SqlCommand and SqlCommandBuilder Pin
Rob Graham19-Sep-06 12:59
Rob Graham19-Sep-06 12:59 
QuestionReporting Services Parameter Dependencies Pin
CandyMe19-Sep-06 1:18
CandyMe19-Sep-06 1:18 
QuestionSelect Column (as Parameter) from Table Pin
CandyMe19-Sep-06 0:52
CandyMe19-Sep-06 0:52 
AnswerRe: Select Column (as Parameter) from Table Pin
_AK_19-Sep-06 1:28
_AK_19-Sep-06 1:28 
AnswerRe: Select Column (as Parameter) from Table Pin
albCode19-Sep-06 5:13
albCode19-Sep-06 5:13 
GeneralRe: Select Column (as Parameter) from Table Pin
CandyMe19-Sep-06 16:23
CandyMe19-Sep-06 16:23 
AnswerRe: Select Column (as Parameter) from Table Pin
Michael Potter20-Sep-06 5:32
Michael Potter20-Sep-06 5:32 
GeneralRe: Select Column (as Parameter) from Table Pin
CandyMe20-Sep-06 17:20
CandyMe20-Sep-06 17:20 
QuestionSystem.Data.DB.ConcurrencyException Pin
kishorepv18-Sep-06 23:10
kishorepv18-Sep-06 23:10 
AnswerRe: System.Data.DB.ConcurrencyException Pin
_AK_19-Sep-06 1:32
_AK_19-Sep-06 1:32 
GeneralRe: System.Data.DB.ConcurrencyException Pin
kishorepv19-Sep-06 19:33
kishorepv19-Sep-06 19:33 
GeneralRe: System.Data.DB.ConcurrencyException Pin
_AK_19-Sep-06 19:36
_AK_19-Sep-06 19:36 
GeneralRe: System.Data.DB.ConcurrencyException Pin
kishorepv19-Sep-06 21:16
kishorepv19-Sep-06 21:16 
GeneralRe: System.Data.DB.ConcurrencyException Pin
_AK_19-Sep-06 21:21
_AK_19-Sep-06 21:21 

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.