Forum Replies Created

Viewing 7 posts - 121 through 127 (of 127 total)

  • RE: Wrapper to run stored procedure many times

    Hi,

    I sometimes like to construct the code to execute the procedures with a script like the following, it has been very useful to me lot of times, but it has...

  • RE: Generate script to change column length of string datatypes in a DB

    Hey i liked your script, i made just a litle change to make it smaller, i hope you like too. There you go:

    DECLARE @SQLCode AS VARCHAR(MAX)

    DECLARE @TargetSize AS VARCHAR(50)

    SET @TargetSize...

  • RE: What's Today?

    i had to research cuz i'm mexican and i was not aware of it.

  • RE: sp_tables

    Oh men, i was thinking about table valued functions and i answer incorrectly, they can be in a "from" clause. I was being very literal, surely msdn did not mean...

  • RE: What is wrong with this query?

    Im miss the first part sorry.

    DECLARE @Field1 AS VARCHAR(50)

    SET @Field1='''FieldOne'''

    DECLARE @Field2 AS VARCHAR(50)

    SET @Field2='FieldTwo'

    DECLARE @Field3 AS VARCHAR(50)

    SET @Field3='''ID[0]'''

    DECLARE @Type3 AS VARCHAR(50)

    SET @Type3='''Int'''

    DECLARE @SQL AS VARCHAR(100)

    SET @SQL='Select '+@Field1+','+@Field2+', cox.value('+@Field3+','+@Type3+') from ATable'

    print(@SQL)

    output:

    Select...

  • RE: What is wrong with this query?

    sorry i did not copy the first two statemetens. Here we go again.

    DECLARE @Field1 AS VARCHAR(50)

    SET @Field1='''FieldOne'''

    DECLARE @Field2 AS VARCHAR(50)

    SET @Field2='FieldTwo'

    DECLARE @Field3 AS VARCHAR(50)

    SET @Field3='''ID[0]'''

    DECLARE @Type3 AS VARCHAR(50)

    SET @Type3='''Int'''

    DECLARE @SQL...

  • RE: What is wrong with this query?

    You can try something like this for concat FieldName and/or types to a query.

    DECLARE @Field2 AS VARCHAR(50)

    SET @Field2='FieldTwo'

    DECLARE @Field3 AS VARCHAR(50)

    SET @Field3='''ID[0]'''

    DECLARE @Type3 AS VARCHAR(50)

    SET @Type3='''Int'''

    DECLARE @SQL AS VARCHAR(100)

    SET @SQL='Select...

Viewing 7 posts - 121 through 127 (of 127 total)