Hi gurus -
I have a DTS that just does a count on a table , writes the info to a txt file and should then increment the global variable using this
' increment the Global Variable (BatchNumber)
DTSGlobalVariables("BatchNumber").value = iBatchNumber + 1
it works fine when I run...
Unfortunately it looks like there have been deletions leaving gaps in the id no's everywhere ...
eg a TOP 20 PERCENT
gives row 5000 a unique id of 67000 + !
>>Do you have any identity column in the table?
yes
>> Can you change the structure of the table?
no
I just need to change one field to this -
row 1-5000 field = Batch1
row 5001 - 10,000 field = batch2 etc
cheers for the prompt reply
hi gurus
I have 25000 rows that need updating (eg first 5000 = batch1,next 5000 = batch 2 etc)
What is the best way to do this ?
SELECT TOP 20 PERCENT ?
or a cursor ... ?
any pointers would be most appreciated ...
cheers
update table
set id= 55,
name = 'jo',
name2 = 'smith'
where ISNULL(postcode,'none'),
LEFT(ContactPostCode,3) IN ('L60','L61','L98','L97')
I know it must be obvious ;@)
cheers guys !
Gurus -
I need to strip out invlaid dates (eg leap years etc) -
Using this regex at the mo
if ($phone_num !~ /^[0-3][0-9]\/[0-1][0-9]\/[1-2][0-9][0-9][0-9]$/)
- This will not catch leap years or 39/16/2005 etc ...
Any help would be great chaps ....
Rab
OK gurus -
I come from a perl/mysql background but need to get up to speed with VBScript/ActiveX within DTS's etc..
Can any one give me a few links etc ...
Just simple stuff for now ... eg just need to read in a file and write out a new one if a certain field is not certain criteria ...
Gurus
I have a file in this format -
field1 field2
I am substituting the spaces for commas and then doing a foreach splitting on the comma - great -
But I have just found that the first field can be of differing lengths hence the number of commas inserted will change
eg -...
Hi again gurus -
A more general question this time -
Is it feasible to read in 2 spreadsheets (with say Spreadsheet::ParseExcel) and combine the two into one ...
Each of the input spreadsheets will only have one worksheet ... I just need to put them both into one ...
Any pointers would...
Cheers Trojan -
The spec has changed slightly -
I am running a foreach over a config file - within this I split out the details with another foreach, and then I need to print the details to a spreadheet ...
eg -
foreach over config file {
foreach $entry (@rs) {
$var1,$var2 =...
Hi gurus once again -
I am looping throgh a csv with a number of fields splitting on the comma -
I need to take one of the fields and make this a tab in a spreadheet (on each iteration)- then add the remaining fields from the csv to the worksheet
The problem I have is when I do the foreach...
Hi gurus -
I have an input file like so
10.0.0.1 servername
10.0.0.2 servername2
10.0.0.2 servername2
10.0.0.3 servername3
I am reading in the file and just writing out the Servername to a new output file -
But - I only want one entry for servername2 (and any other dupes) in the new file...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.