Forum Replies Created

Viewing 15 posts - 4,336 through 4,350 (of 5,590 total)

  • RE: SQL To Generate Years (or even Quarters) within a date range

    You can use this example for how to create the missing years. If you can't get it working with this, please do as Lynn suggests, and give us table structures...

  • RE: keeping a table variable alive

    No, this is the way that table variables are supposed to work.

    What you can do is change all of the "DECLARE @TABLE TABLE" statements to "CREATE TABLE #TABLE", then change...

  • RE: How to Determine SQL license information

    Lynn Pettis (4/20/2010)


    SQL Server no longer tracks licensing information. You need to do that manually.

    Thanks Lynn. I remember that now after reading it.

    Wonder why those parameters for ServerProperty still...

  • RE: Insert with a Select and an Exists

    sturner (4/20/2010)


    Then EXCEPT or LEFT OUTER JOIN is what you want.

    Agreed.

    EXCEPT will get you a list of all of those that you want them to have, minus the ones already...

  • RE: How to Determine SQL license information

    This will get you the information for one server:

    select ServerProperty('LicenseType'), ServerProperty('NumLicenses')

    What I would do is to incorporate this into the SQLCMD command line utility, using the FOR /F dos command...

  • RE: Are the posted questions getting worse?

    Lynn Pettis (4/20/2010)


    Lynn Pettis (4/20/2010)


    If anyone else can provide some guidance here it would be appreciated.

    Thanks Wayne for jumping in here to help.

    NP. Haven't heard back from the OP yet...

  • RE: SQL Server Ranking Functions

    Jeff Moden (4/19/2010)


    Yowch... the formatting monster hit the code hard on this one. I hope Steve can fix it soon.

    I think it's all fixed now... all the code...

  • RE: CASE or IF statement

    To elaborate on what Lynn mentioned, you can use either the IF or CASE statements as shown below:declare @var1 char(3),

    @var2 char(3)

    set @var1...

  • RE: Insert with a Select and an Exists

    Rog Saber (4/20/2010)


    I have a table MAINT_REQ in which I want to insert values. I want 'mary' to have all of the same roles as 'jo'. 'jo' has a bunch...

  • RE: time lag in TRN file names.

    If you're using a monitor server, the "Transaction Log Shipping Status" report (available in SSMS, right-click the server, select reports | Standard Reports | Transaction Log Shipping Status), and you...

  • RE: pivot query

    You might want to check out this link for help in pivoting a query.

  • RE: comparing two different string patterns

    You might want to check out the REPLACE function in BOL.

    You might also check out the LIKE function... you might be able to use it as LIKE '%[SX]VD%'.

  • RE: Is Primary key clustered index different from Unique key clustered index??

    Perry Whittle (4/17/2010)


    when referring to key constraints

    Primary key does not allow NULLs

    Unique key allows a single NULL value

    so the 2 are different in that respect

    I was just thinking about this,...

  • RE: Procedure has too many arguments

    I don't see an issue with your code.

    I just ran this code, without error.

    CREATE PROCEDURE [dbo].[sp_TLCOMSCandReg] (@CandID VARCHAR(50) output,@FirstName VARCHAR(100),@MiddleName Varchar(100),

    @LastName VARCHAR(100),@EmailID VARCHAR(250),@MobileNo VARCHAR (15),

    @PhoneNo VARCHAR (15),@DOB DATETIME,@Gender SMALLINT,@Address...

  • RE: Procedure has too many arguments

    This doesn't have anything to do with your issue, but why are you passing nvarchar fields to a procedure that is expecting varchar?

Viewing 15 posts - 4,336 through 4,350 (of 5,590 total)