Forum Replies Created

Viewing 15 posts - 11,881 through 11,895 (of 13,460 total)

  • RE: Called From Where?

    you have access to that informatino in your exe

    in vb6 it's app.path returns the folder the exe is running from

    in .NET it's Application.StartUpPath;

    it depends on what language you wrote your...

    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: Find out which table columns were inserted from within a trigger

    on INSERT, of course Columns_Updated returns 3...ALL columns (column 1 and column2 )are affected on INSERT, even if a null gets inserted.....

    but if you UPDATE, using jeff's same example,

    UPDATE TriggerTest...

    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: Stored procedure

    you can't use a variable for an objectname..so you cannot stick something in to replace a tablename or fieldname directly in a statement...you have to use dynamic sql:

    fails:

    if not exists('select'+@Fieldname...

    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 triggers

    --[Inserted] And [Deleted] tables are special virtual tables that contain all the records affected by the insert or delete; it is critical that in a trigger you use a set...

    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: Concatenate three columns but not when the column contains 'Value'

    SELECT

    CASE WHEN LEVEL1 = 'PLEASE SPECIFY' THEN '' ELSE LEVEL1 END +

    CASE WHEN LEVEL2 = 'PLEASE SPECIFY' 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: Cannot resolve collation conflict for column 1 in SELECT statement

    i got the same error on one of my databases when i tested your code;

    adding collation to the first field fixed it for me:

    select 'DROP INDEX ' + object_name(s2.object_id)...

    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 SQL Server table from a Temp table

    ok, since it appears the databases exist on the same server, you could do this:

    Update DataBase1.dbo.MyTable2 m

    SET m.field1 = ##MyTempTable.field1

    FROM ##MyTempTable

    WHERE m.field2 = ##MyTempTable.field2

    Update DataBase2.dbo.MyTable2 m

    SET m.field1 = ##MyTempTable.field1

    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: Secondary Backup / Restore Strategy

    you can get a USB Terabyte and a half external drive for as little as 180 bux; whether you zip/rar an backup, or use a 3rd party tool, tha tmight...

    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: Insert into table

    if the table already exists:

    INSERT INTO License_Audit(LicenseType,LICENSECOUNT,AUDITDATE)

    SELECT 'MENU',COUNT(USER_ID) AS LICENSE_COUNT ,getdate()

    FROM VMFG.dbo.LOGINS

    WHERE PROGRAM_ID = 'MENU'

    to create the table on the fly:

    SELECT 'MENU' AS LicenseType,COUNT(USER_ID) AS LICENSE_COUNT ,getdate() AS AUDITDATE

    INTO...

    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: Is there a better way for this code?

    his query comes from a different system originally, not all dbms can use the UPDATE...FROM syntax, and instead use the style you see here....set somevalue = ([subquery referenncing the updating...

    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: Is there a better way for this code?

    i think this part of the query is contributing to the slowness:

    AND a.LineNum <= D_BomCalcTrans_t05_t.LineNum

    because that can't be resolved as...

    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 SQL Server table from a Temp table

    you are going to kick yourself...you did all the work, and are just missing the UPDATE ...FROM part:

    Update MyTable2 m

    SET m.field1 = ##MyTempTable.field1

    FROM ##MyTempTable

    WHERE m.field2 = ##MyTempTable.field2

    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: Installed 2000 Standard, but version is showing Personal

    yes you are right; and this is wierd;

    if the OS is 2003, then it should install 2000 standard version; if it is saying personal edition, that is not right....

    is 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: Installed 2000 Standard, but version is showing Personal

    in a nutshell, you can't.

    you'll have to upgrade your operating system.... SQL 2000 standard or enterprise can only be installed on Server version operating systems...Win2000,2000 advanced server, 2003;

    The cd gracefully...

    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: Convert Binary Data to XML in a select

    see if this will help;

    here i'm just taking a static value and casting it to binary, then casting it back again.

    i believe that is all you'll have to do; 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!

Viewing 15 posts - 11,881 through 11,895 (of 13,460 total)