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 gkittelson 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: *

  1. heatherb0123

    SQL Server - Conditional Grouping??? Need Help!

    I am creating stored procedure in SQL Server 2008. I'm a little confused on how to group a specific column only when it meets the criteria below. Can anyone help? I have notes in the code below. Thanks. Criteria: 1) @Coverage & @GroupByMain are optional i.e if a null value is passed for these...
  2. heatherb0123

    SQL Server Upt Stored Proc Duplicating Records

    Thanks sooooo much George!!!!!! That worked perfect and I have a better understanding of working with nulls now! Heather B...
  3. heatherb0123

    SQL Server Upt Stored Proc Duplicating Records

    Thanks everyone! George I changed my "IF EXISTS" statement (see the code below). It's no longer duplicating records, however the update function is not working now. USE [cashNotification] GO /****** Object: StoredProcedure [dbo].[Upt_DCF_Balances] Script Date: 12/17/2010 13:33:17 ******/...
  4. heatherb0123

    SQL Server Upt Stored Proc Duplicating Records

    I can't change the table structure, so I'm forced to do this in the stored proc. What if I don't know which parameter would be null at any given time? How do I code this? I'm a newbie so I really appreciate your help! Heather B...
  5. heatherb0123

    SQL Server Upt Stored Proc Duplicating Records

    Yes I am passing in a null value for "HiNetMinor". I changed the code (see below) and it still doesn't work. Any suggestions? ------------------------------------------------------------ USE [cashNotification] GO /****** Object: StoredProcedure [dbo].[Upt_DCF_Balances] Script Date...
  6. heatherb0123

    SQL Server Upt Stored Proc Duplicating Records

    I'm trying to create a stored procedure that updates records when they exist, and creates a new record when they don't. The code I'm using is duplicating the existing records. Can anyone help? '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' USE [cashNotification] GO SET ANSI_NULLS...
  7. heatherb0123

    create temp local table from ado recordset

    Thanks for everyone's help. I figured it out. The error was in my loop statement. Below is the corrected code. '''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Loop around the SQL recordset to populate the local recordset and update tblHiNet_Data Dim intCount As Integer If rs.EOF =...
  8. heatherb0123

    create temp local table from ado recordset

    Below is the code where I verified the rsSQL is pulling the correct # of records from Sybase. When I run this it prints the exact amount of records that should be put into the local Access tables. When I use this same SQL Statement in my main code (above), it doesn't work...
  9. heatherb0123

    create temp local table from ado recordset

    rsSQL" shouldn't be empty because the data is coming from "rsSQL.Open cmdSQL" which is the T-SQL code pulling the data from Sybase. I do want to delete all records from "rsL" (record set Local i.e. "tblHiNet_Data"), however "rsSQL" should have data in it. Can you tell me how to go about changing...
  10. heatherb0123

    create temp local table from ado recordset

    I'm trying to create local Access tables for data linked via ODBC from Sybase (I know the SQL code connecting to Sybase is correct. I tested it in a diff module and it returns the exact # of records). I would like to create tables within access, but I can't get the code to work. Any help would...

Part and Inventory Search

Back
Top