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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How to generate 13 digit number from two data colu

Author  Topic 

Vaishu
Posting Yak Master

178 Posts

Posted - 2007-08-22 : 09:37:42
Hi

I have two below datacolumns

'code'- varchar 255 (Unique number) data : chr456Umx
'Packs'- integer data : 6

Is it posible to generate 13 digit number using the above two columns,
The reason is if I run the procedure I will get same 13 digit all the time depending on the above two colums


below is the sample procedure I am using


CREATE PROCEDURE AMZSelCen
@imglink nvarchar(255)

AS

Select code as sku,
PdtBarCode as [standard-product-id],
'EAN' as [product-id-type],

--generate 13 digit number

make+' '+model+' ' +', Price for '+cast(NumPacks as varchar(8)) +' '+'Packs' as title,
make as manufacturer,'

from tablename
where ......

Advance thanks

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-08-22 : 10:25:05
Cross posting!
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=88217




E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

Vaishu
Posting Yak Master

178 Posts

Posted - 2007-08-22 : 10:31:14
sorry, I desperatly need the solution. I will not do in future.
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-08-22 : 11:02:54
Cross posting will only lead to double the time to get an answer.



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page
   

- Advertisement -