Forum Replies Created

Viewing 15 posts - 11,716 through 11,730 (of 13,460 total)

  • RE: get timestamp from Oracle via Linked server

    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...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Can this script handle large xml files?

    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,...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Remove extra space from a a Text type field

    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...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Can this script handle large xml files?

    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,...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: How to get all columns with empty value in table

    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...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: How to get all columns with empty value in table

    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...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: How to pass table variable into SQL UDF

    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.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: How to get all columns with empty value in table

    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...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Zip Code Lookups

    33938 records....seems like an awful lot of zip codes cross counties.

    here's a link to a tab delimited text file:

    CrossCountyZipCodes.txt

    here's my source table that I used; i did a distinct from...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Zip Code Lookups

    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...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: How to update a column which is coming from two different sources?

    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...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: How to update a column which is coming from two different sources?

    i'd simply insert from a UNION of the two alternate sources;

    insert into Table1(alotofcolumns)

    select alotofcolumns from Server1.Database.dbo.Source1Table WHERE criteria=1

    union

    select alotofcolumns from Server2.Database.dbo.Source2Table WHERE criteria=1

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: update and insert trigger

    you don't even need to check, really

    you simply do two steps in the trigger

    you update first, and if it exists, it gets updated. if it didn't exist, nothing gets touched.

    then...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Breakdown IP Addresses

    a builtin function called PARSENAME can do this for you...irt was designed to parse dbname.owner.table.columnname, but works greate for IPs:

    declare @val varchar(20)

    set @val='192.168.1.100'

    select parsename(@val,4),parsename(@val,3),parsename(@val,2),parsename(@val,1)

    1921681100

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Are the posted answers getting worse?

    i really like the answers that point to a link with letmegooglethatforyou.com...i really think it makes people think twice.

    so yeah, our answers might be a little arrogant when we do...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 15 posts - 11,716 through 11,730 (of 13,460 total)