Microsoft
Software
Hardware
Network
Question : Adding a unique identifier to a field for export
I am trying to create a file for import to our accounting program; I am exporting a PO, see example below. The RefNumber below is the unique identifier, so right now, the vendor shows up as Microsoft for all the lines. I need to add something to the query that changes the ref number to "12345-1" for the MS line, "12345-2" for all the Ingram lines, "12345-3" for TechData, and so on.
Payee RefNumber Transaction Date
Microsoft 12345 11/04/2009
Ingram Micro 12345 11/04/2009
Ingram Micro 12345 11/04/2009
Ingram Micro 12345 11/04/2009
TechData 12345 11/04/2009
TechData 12345 11/04/2009
Answer : Adding a unique identifier to a field for export
or w/o function
update mytable m1
set id = id & "-" & (select count(1)+1 from mytable m2 where m2.Payee=m1.Payee and m2.RefNumber=m1.RefNumber and m2.id< m1.id)
where instr(id,"-") = -1
Random Solutions
is there a difference between C++ in visual studio 2008" and "visual C++ 2008"
How to access CD-ROM/Audio of Thin Client Device after login to Microsoft Terminal Server?
PictureBox DataBinding
Entourage 2008 users can no longer login/sync to Exchange 2007
Can not register DNS for new 2003 domain controller. Using infoblox appliance for dns.
Short words in MSSQL full text search. Need them included!
SQL needs to ignore input mask
File System Task to rename file giving failed to lock variable error
windows 7 remote desktop
Teaching an ANSI SQL class and need a datasource and editor to practice writing code