Forum Replies Created

Viewing 15 posts - 7,276 through 7,290 (of 15,381 total)

  • RE: Plugging in a variable column name in a stored procedure

    Annee (8/5/2013)


    Sure.. thanks for the inputs.. what would the dynamic sql syntax look like??

    Appreciate any help with the syntax to accomplish this.. thanks!

    Something like this.

    CREATE PROCEDURE [dbo].[pr_GetVendorInfo]

    (

    @ClientName nVarChar(15),

    @VendorName nVarChar(40),

    @InvoiceType nVarChar(10)

    )

    AS

    declare...

  • RE: Plugging in a variable column name in a stored procedure

    Annee (8/5/2013)


    I am using SQL server 2005

    Here is the ddl:

    CREATE TABLE [dbo].[AgencySupplierPartner](

    [ClientName] [nvarchar](15) NOT NULL,

    [VendorName] [nvarchar](40) NOT NULL,

    [TaxID] [nchar](9) NOT NULL,

    [AcceptStandard] [nvarchar](10) NULL,

    [AcceptSummary] [nvarchar](10) NULL

    CONSTRAINT [PK_AgencySupplierPartner] PRIMARY KEY CLUSTERED...

  • RE: SQL Detection by Edition/Version

    gbill (8/5/2013)


    This is rather general, not really limited to 2012. My company has requested I find a way to automatically detect which edition/version is installed. Are there file...

  • RE: How to select range of consecutive events

    Hi and welcome to the forums. What you are describing is generally known as gaps and islands. For finding groups of contiguous dates this article does a great job explaining...

  • RE: Update w/ SELECT ???

    jbalbo (8/5/2013)


    so what I need to do is update the client_identifier table based on the client ID on the client table with a link table in between..

    so my spreadsheet looks...

  • RE: Update w/ SELECT ???

    jbalbo (8/5/2013)


    Hi

    Trying to update a bunch of records , figured I'd use the following by using an excel SS with concatenate..

    I have a synax error somewhere but can't find...

  • RE: SELECT ... INTO NewTable without nulls

    Amy.G (8/5/2013)


    I am creating a table by using the

    SELECT column1, column2

    INTO NewTable

    FROM OldTable

    method. Is there a way of creating a table in this manner and saying if the columns should...

  • RE: Run at Certain Time of Morning

    Jeffrey Williams 3188 (8/5/2013)


    My be a bit simpler to read this:

    IF cast(getdate() as time) >= '09:00'

    Aye!!! That it is.

  • RE: Get last transaction from multiple groups of records

    Your inserts didn't work because you have specified a value for each row but the values are all the same. I modified that so it will work.

    IF OBJECT_ID('TempDB..#mytable','U') IS NOT...

  • RE: Run at Certain Time of Morning

    OldSageMonkey (8/5/2013)


    Thanks its saved that time, Ill wait till tomorrow and see if it runs. 🙂

    It will run and it will be successful no matter what time it actually runs....

  • RE: Get last transaction from multiple groups of records

    Hi and welcome to the forums. In order to help we will need a few things:

    1. Sample DDL in the form of CREATE TABLE statements

    2. Sample data in the form...

  • RE: Query Help - Sum by Month

    DDL and sample data would have made this a lot easier. 🙂

    Basically this is a normal group by situation except that you need to do some date math to group...

  • RE: Delete a records in all Tables

    Minnu (8/5/2013)


    Hi Team,

    I've having 120 tables in that 80+ tables have "emp_id" as a column_name, mistakenly i've inserted a record in to Employee table,

    there are many triggers on that...

  • RE: sp_spaceused columns?

    asco5 (8/5/2013)


    Hi can someone help please

    i just did

    sp_spaceused '[db].[db].[demo]'

    where demo is my table

    but i would like to get the rows, reserverd , data , index_size and unused only for...

  • RE: Stored Procedure syntax

    M Joomun (8/5/2013)


    Sean Lange (8/5/2013)


    M Joomun (8/5/2013)


    Yes, thanks Sean. Changing the dataype has worked.

    Glad that worked for you. More importantly, do you understand why that worked?

    Because it's looking for a...

Viewing 15 posts - 7,276 through 7,290 (of 15,381 total)