Forum Replies Created

Viewing 15 posts - 11,731 through 11,745 (of 13,469 total)

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

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

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

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

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

  • 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

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

  • 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

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

  • RE: Help with Check Constraint

    i think you'll have to move the logic to an ON INSERT trigger, ;

    this might be a little tricky, considering that a trigger needs to assume multiple rows might exist....

    say...

  • RE: 16 digit unique number

    I agree with Barry; still waiting to hear why an Identity() column, or varchar based off of an identity, or a GUID won't do the job.

  • RE: Generating scripts using T-SQL

    for views,procedures,functions (and triggers) you could use a cursor to exec sp_helptext [objectname]

    that would give you the script for those objects, assuming they were not marked WITH ENCRYPTION when they...

  • RE: how can we see the user defied function's code

    harish_ravi (1/20/2009)


    is it possible to call a user define function in SQL Server from asp.net page (, just like we call a stored procedure from asp.net page) ???

    if so please...

  • RE: Problem with NULL value

    the ISNULL function substitutes a value in place of the variable or column if it is null:

    SELECT ISNULL(@Variable1,0.00) - ISNULL(@Variable2,0.00)

  • RE: Deleting 150+ million rcds - Tips ?

    two things to consider....

    if you are going to delete the records after archiving them off to another table, consider doing it in batches....if you do too many rows at a...

Viewing 15 posts - 11,731 through 11,745 (of 13,469 total)