Forum Replies Created

Viewing 15 posts - 6,781 through 6,795 (of 13,460 total)

  • RE: remove 'dead views'

    views(as well as procs and functions) can become invalid if the underlying tables/views they use have changed, got dropped, etc.

    in SQL 2000 (the forum you posted in) you cannot use...

    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 can we Upload files to SFTP server using SQLSERVER 2005 Stored procedures.

    you can call CoreFTP via a command line, and it supports SFTP.

    once a profile is setup for the destination SFTP with the username and password in it, you can call...

    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 do I import this data?!

    all right, this was interesting for me, as I know i could do it in TSQL.

    here's a working solution for header and data...i ignored the footer information for now.

    copy and...

    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: Assigning values using CASE statmenent

    well, you are using a two part test for the "Cash Payment"...chknumber has to be blank and ALSO you are checking the amount...

    i'd think that the amount may be...

    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: Assigning values using CASE statmenent

    yep null would probably be the culprit; just wraping it with ISNULL should fix it i think:

    select

    CASE

    WHEN ISNULL(chcknumber,'') = '' AND checkAmount <> ''...

    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: Assigning values using CASE statmenent

    just syntax; the case returns the desired value only, so you can't have a assigning, like that chknbr='Cash':

    select

    CASE

    WHEN chcknumber='' AND checkAmount <> ''

    ...

    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: Foreign Key Index

    here's my take on it;

    this query featuring a CTE lists all foreign keys, and if there is an index with the leading column on the child table or not.

    if it...

    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: Making a Named Instance listen on a certain port.

    In the past, i've changed it where i've circled it below under IPAll. that has been how i assigned a static port for my express isntance to listen to.

    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: Reports not getting most recent data

    you must have a process that is harvesting the data off of the web site, right?

    if the format of the data changed, that would throw off the import of the...

    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: SQL Job with IF Criteria

    i'd code it with an EXISTS like this:

    IF EXISTS(SELECT 1

    FROM PARM

    ...

    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: Cant get my head around this error???

    dave could that be mySQL that you pasted?

    the syntax doesn't match SQL server;

    the equivilent would be like this:

    IF Object_id('StormHeader') IS NULL

    CREATE TABLE StormHeader ( ...rest of definition

    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: I need a view to insert records to a table

    you can create an INSTEAD OF trigger on a view, and have that trigger do the DML to the desired underlying tables.

    your code will then try to insert/update/delete fromt he...

    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: Restore database

    lol i got two honorable mentions in there!

    I gotta know, what is in that Lowell_used_columns file? i'm sure i have the same script saved, but I dunno what yours references!

    Thanks...

    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: get number of days from two dates

    ahh the by months things going to be tough...you can't just use the 87 days between them? you have to have it broken down my whatever number of months between?

    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!

  • RE: Restore database

    Ninja's_RGR'us (9/8/2011)


    How big is the log file in the restored DB? That file needs to be 0 initialized and that takes time.

    http://sqlskills.com/blogs/Kimberly/post/Instant-Initialization-What-Why-and-How.aspx

    ahh, yeah zeroing out the log file ,...

    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 - 6,781 through 6,795 (of 13,460 total)