Forum Replies Created

Viewing 12 posts - 16 through 27 (of 27 total)

  • RE: Script Generate Indexes

    GilaMonster (4/6/2016)


    shaneoneillis (4/6/2016)


    If you want to include them when you script a table go to the following on SSMS:

    Tools --> Options --> SQL Server Object Explorer --> Scripting --> under...

  • RE: Script Generate Indexes

    If you want to include them when you script a table go to the following on SSMS:

    Tools --> Options --> SQL Server Object Explorer --> Scripting --> under "Table and...

  • RE: Change Order of Week Names to Show Current Data First

    Phil Parkin (4/5/2016)


    clbishop (4/5/2016)


    Hello. Pardon me, I'm new to both this forum and SQL.

    I need assistance with code that will allow me to change the return order of week names....

  • RE: Would You Move For a Job?

    Haha I did exactly that!

    Moved from a Limerick company that was brilliant at application programming but saw the database as "dat ting dere you put da stuff into" and...

  • RE: Combining two qureies to one

    LEFT JOIN RejectReason ON RejectReason.PolicyAuditID = PolicyAudit.ID

    LEFT JOIN (SELECT TOP (1)

    ...

  • RE: issue with single quotes in the column values

    Have you tried wrapping the columns in the QUOTENAME() function, and then specifying that you want them quoted with apostrophes ('')?

    QUOTENAME([column_name], '''')

    'SELECT ' + QUOTENAME(LTRIM(RTRIM(ClientList.Cust_Id)), '''') + ', ' +...

  • RE: SQL convert

    My bad, at the start I didn't know what the datatype of the column was.

    Should have spotted that in the second post.

    Would have made it easier to read, understand...

  • RE: SQL convert

    No worries, we're all still learning and at least you'll have this tool under your belt now 🙂

  • RE: SQL convert

    I tried the below in SQL server, I get different results...

    select field10,field5,right(replicate('0',2) + REPLACE(QUOTENAME(t.field10, ''''), '''', ''),10) + '-" + t.field5 name_yn

    from table2 t

    field10 - smallint

    field5 - ...

  • RE: This noob needs some help

    You were very close Brad, you just don't need to set the variable equal to each time for the case statement.

    Just set it equal to at the start and then...

  • RE: SQL convert

    Looks good, probably be a bit more helpful if you included what you think the REPLICATE query would go like?

    Another option would be to use the RIGHT() function

  • RE: The Worst Comments

    I found this one trying to debug some code...I loved it so much that I left it in

    SELECT @DEFAULT_DMR =....

    --ff**king useless suppliers

    DELETE FROM...

    without the asterisks of course

    😀

Viewing 12 posts - 16 through 27 (of 27 total)