Viewing 15 posts - 11,716 through 11,730 (of 13,464 total)
Follow with what Jeff And Lynn said; repalce with an int where isnumeric is true:
UPDATE YOURTABLE SET Login = Convert(varchar,CONVERT(INT,Login)) Where IsNumeric(Login) =1
the rows like 'jc4444' will not be...
January 26, 2009 at 10:27 am
by using a Tally or Numbers table, you could insertall the items, with the proper qty's in in a single statement:
CREATE TABLE #TEMP (QTY INT, ORDERITEM VARCHAR(30),MORESTUFF VARCHAR(30) )
INSERT INTO...
January 26, 2009 at 5:55 am
there was a different thread on zipcodes here where i posted a text file to a bunch of zip code/city/state stuff...are you just trying to get a list of all...
January 23, 2009 at 7:54 pm
since current_timestamp is a variable, it really doesn't matter which table you get it from;
by same question, you mean from a linked sql server?
i did select top 1 current_timestamp from...
January 23, 2009 at 7:49 pm
oracle has SYSDATE ahs an equivalent of our GetDate();
oracle would be SELECT SYSDATE FROM DUAL;
(oracle syntax requires a FROM clause...DUAL is a dummy table that can be used to supply...
January 23, 2009 at 5:39 pm
the thing is, the XML gets chopped right in the middle....you can't loop thru it, because it's not like each 8000 chars are well-formatted XML. it'd truncate something;
without upgrading,...
January 23, 2009 at 11:23 am
since a third party software is invloved, and you can't change the datatype, I have just the tool for you.
I've used this to Find-And-Replace within text fields lots of times...for...
January 23, 2009 at 11:16 am
yep you are ring....your getting an issue because ov the varchar(8000)
150 lines X ~80 chars per line or so, and you pass the limit for the definition.
this proc, on SQL2000,...
January 23, 2009 at 11:04 am
wait, i think i get it....still use a loop or FOR XML to construct the complete set of statements, and run the massive varchar(max) as a batch, instead of line...
January 22, 2009 at 9:39 pm
ok...i'll bite...how do you find each column that hass null/empty string as a report without a cursor?
at least in this case, i only saw dynamic sql and a cursor....i can't...
January 22, 2009 at 9:28 pm
on;y SQL 20l08 has a table variabe as a parameter for an option.
in 2000 you'll need to do all the work in a single udf instead of 2 udfs.
January 22, 2009 at 9:13 pm
here's a cursor based solution that finds all char/varchar columns for a given table, then queries each for empty /nulls, aqnd provides the results, along with the query to find...
January 22, 2009 at 9:06 pm
33938 records....seems like an awful lot of zip codes cross counties.
here's a link to a tab delimited text file:
here's my source table that I used; i did a distinct from...
January 22, 2009 at 4:02 pm
i've got a massive zip+4 database; I just started essentially the same query, and will post a link to the file with the results; had to do it on my...
January 22, 2009 at 3:23 pm
it's just an update instead of an insert....but there has to be something to join the data...an ID column or some other criteria.
you should really ALWAYS post the real table...
January 21, 2009 at 9:36 pm
Viewing 15 posts - 11,716 through 11,730 (of 13,464 total)