cancel
Showing results for 
Search instead for 
Did you mean: 

SQL sentence and SBO

Former Member
0 Kudos

Hi gurus !!

i have a probleme whith a simple (i think...) query :

I create a USerTable and i populate "Code" and "Name" with the value which are the max + 1.

All is ok until 10...

So, i convert my "Code" field :

SELECT MAX(CONVERT(NUMERIC(8),Code)) as TEST FROM dbo.[@USERT_TABLE]

On Sql Server, i don't have any problem, via SBO, :

"Convert of then string "" in a double isn't valid !!"

!!??

Why ? There is no row whith "" in Code (fortunatly, it's the primary key...)

Thanks for your help and time.

PS : Sorry for my english..

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Laurent,

I have tested your query in SBO and it is working on my side. I have also tried converting to an integer and it still works with Query Generator of SBO. Not sure what the problem is on your side, but on mine it is working. Are you sure one of the fields doesn't maybe have a string value in it?

Hope it helps,

Adele

Former Member
0 Kudos

Thanks Adele, but i'm solved myself..

I think i'm going to stop Vodka at office....

The probleme was me not the SBO or SQL.

Thanks.

Former Member
0 Kudos

Congratulations on solving it. Maybe the Vodka was helping...