Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: dba112233
  • Order by date
  1. dba112233

    Cannot reference file in BULK INSERT statement

    thank you, I understand. Really, it's looking at the server's C drive at that point because you're connected to the server in Analyzer, not (local)
  2. dba112233

    Cannot reference file in BULK INSERT statement

    >>>>Is SQL Running on the same computer you are trying to BULK Insert from? Not the server, the user simply has a client install where they're using Analyzer to talk to a remote server to insert records into a table they created Ex. Here at the office, I have a workstation (let's call it...
  3. dba112233

    Cannot reference file in BULK INSERT statement

    for some reason, SQL cannot open the file below. I checked the path and in the run prompt it opens fine. It's a synax error I think but the error doesn't say, it's just a generic error: BULK INSERT tablename FROM 'c:\Documents and Settings\sss\Desktop\myfile.txt'
  4. dba112233

    Run SQL Job for certain timezone?

    nevermind, I guess I'll just manually add or minus hours
  5. dba112233

    Run SQL Job for certain timezone?

    How can I tell the scheduler to run at certain times for specific time zones in SQL Server 2000? I don't see a time zone option, just daily, weekly, etc. then times
  6. dba112233

    Question on value

    In my query below, is HAVING cb.CurrentBalance <> SUM(rf10.rmstranamt10) - SUM(rf.rmstranamt) the same as the value that my CASE statements come up with for [balance] ? Isn't putting straight SUM(rf10.rmstranamt10) - SUM(rf.rmstranamt) overriding what I want to be there which is: HAVING...
  7. dba112233

    SUM not working

    figured it out, the user gave me the incorrect business requirements!!
  8. dba112233

    Help - Value not correct

    figured it out, the user gave me the incorrect business requirements!!
  9. dba112233

    Help - Value not correct

    If I have incoming values of rmstranamt rmstrancde 50.00 51 50.00 51 50.00 51 50.00 51 50.00 51 50.00 51 50.00 51 -50.00...
  10. dba112233

    SUM not working

    I sorry, I made a mistake explaining, LET'S start over. If I have incoming values of rmstranamt rmstrancde 50.00 51 50.00 51 50.00 51 50.00 51 50.00 51 50.00...
  11. dba112233

    SUM not working

    crap, I should have this instead SELECT RMSFILENUM, RMSTRANCDE, SUM( CASE WHEN rmstrancde IN ('50','51','52','53') AND rmstranamt < 0 THEN rmstranamt WHEN rmstrancde IN ('50','51','52','53') AND rmstranamt >= 0 THEN -ABS(rmstranamt)...
  12. dba112233

    SUM not working

    EXACTLY If it's already negative, keep it negative...
  13. dba112233

    SUM not working

    Here's the SUM portion of my code: INNER JOIN ( SELECT RMSFILENUM, RMSTRANCDE, SUM( CASE WHEN rmstrancde IN ('50','51','52','53') AND rmstrancde < 0 THEN rmstranamt WHEN rmstrancde IN ('50','51','52','53') AND rmstrancde >= 0...
  14. dba112233

    'ABS' is not a recognized function name.

    SUM( CASE WHEN rmstrancde IN ('50','51','52','53') THEN (0 - ABS(DISTINCT rmstranamt)) WHEN rmstrancde IN ('55','56','57','58') THEN ABS(DISTINCT rmstranamt) ELSE DISTINCT rmstranamt END ) As rmstranamt ERROR...
  15. dba112233

    Need help with creating a new TEMP table

    sorry I mean the SECOND INNER JOIN is what I'm referring to
  16. dba112233

    Need help with creating a new TEMP table

    What I want to do is because I cannot perform cursor transactions inside an INNER JOIN, I need to take the following portion out below and throw that filter into a temp table first at the very top of my entire stored procedure. Then I need to reverence that temp table instead of teh RFINAL...
  17. dba112233

    Errors with DECLARE statement

    Ok, then how can I take that query in my first inner join, just the first select and the CASE statement and put the results into a temp table at the very beginning of my stored proc. Then the rest of my main query can use the temp table results instead of RFINANL
  18. dba112233

    Errors with DECLARE statement

    I have to set the value in rmstranamt based on rmstrancde before I sum up rmstranamt set ANSI_NULLS ON set QUOTED_IDENTIFIER ON go alter PROCEDURE [dbo].[Balance_Query] AS SELECT rm.rmsacctnum, rf.rmstrancde, SUM(rf.rmstranamt) AS [Sum rmstranamt]...
  19. dba112233

    Errors with DECLARE statement

    I am trying to do a cursor and such in one of my INNER JOINS which is part of a bigger SQL statement. I am getting the following errors: Msg 156, Level 15, State 1, Procedure Balance_Query, Line 61 Incorrect syntax near the keyword 'DECLARE'. Msg 137, Level 15, State 1, Procedure...
  20. dba112233

    Returning more than one of same acct instead of sum for both

    got it resolved FINALLY, this one was a pain in the tush: INNER JOIN ( SELECT RMSFILENUM, SUM(distinct rmstranamt) AS rmstranamt10 FROM RFINANL WHERE RMSTRANCDE = '10' GROUP BY RMSFILENUM ) AS rf10 ON rf10.RMSFILENUM = rm.RMSFILENUM

Part and Inventory Search

Back
Top