Forum Replies Created

Viewing 15 posts - 8,581 through 8,595 (of 8,760 total)

  • RE: How do i change a string key to an int - normal methods not working!

    isuckatsql (4/13/2014)


    did VARCHAR(20)

    SELECT top 10 CAST(did AS INT) FROM table

    Msg 245, Level 16, State 1, Line 3

    Conversion failed when converting the varchar value 'cht6p575l7ry61k1npt' to data type int.

    SELECT CONVERT(INT, did)...

  • RE: how can I update an xml by variable?

    The query just has an incorrect path, this works:

    😎

    declare @urlRedirect nvarchar(4000)

    set @urlRedirect=N'www.google.com'

    declare @userxml xml

    set @userxml=N'<user>

    <information>

    <userkey>0</userkey>

    <domainname><![CDATA[192.168.0.97]]></domainname>

    <ip>192.168.0.97:2007</ip>

    <from><![CDATA[http://192.168.0.97/default.htm]]></from>

    <time>02/08/2014 08:08:57 ?.?</time>

    <q>https://www.google.com</q>

    </information>

    <urlarea>

    <url>login.htm</url>

    </urlarea>

    <formarea>

    <user><![CDATA[sa]]></user>

    <pass><![CDATA[sa]]></pass>

    <B1><![CDATA[Submit]]></B1>

    <hascdata>false</hascdata>

    </formarea>

    <cookiearea></cookiearea>

    </user>'

    SET @Userxml.modify('replace value of (/user/urlarea/url/text())[1] with sql:variable("@urlRedirect")')

    select @userxml

  • RE: Remove Desing-time variable values from package

    One way of doing this is to edit the package in a text editor and remove the values that way.

    Before:

    <DTS:VariableValue DTS:DataType="14">120</DTS:VariableValue>

    After:

    <DTS:VariableValue DTS:DataType="14"></DTS:VariableValue>

    😎

  • RE: Can some pull off this query for me..

    a4apple (4/12/2014)


    I was thinking if there is any better approach than using the cross Join.

    Don't know if this is better, at least it is slightly different 😎

    DECLARE @Emp ...

  • RE: Convert the stored procedure to "Standard SQL Select"

    Lynn Pettis (4/12/2014)


    There is another way, look at the last Fiscal Year calculation:

    WITH SAMPLE_DATE(XDATE) AS

    (

    SELECT CONVERT(DATETIME2(0),XDATE,120) AS XDATE

    FROM (VALUES

    ...

  • RE: Convert the stored procedure to "Standard SQL Select"

    halifaxdal (4/11/2014)


    I have a very simple stored procedure to be used in Dundas Dashboard:

    ALTER proc [dbo].[ddGetCurrentOpenAndClosed]

    AS

    declare @Open int

    declare @Closed int

    select @Open = count(1) From Document Where DocType = 1 and...

  • RE: Sending data from MS SQL Server do PostgreSQL server using CLR triggers

    I agree with Jeff here, a trigger is not a good idea. Could you shed a little more light on the setup?

    Eirikur

  • RE: Sending data from MS SQL Server do PostgreSQL server using CLR triggers

    It all depends on how quickly you have to get the data from A to B, first option would be a linked server (via ODBC), have you tried this?

    😎

  • RE: Sending data from MS SQL Server do PostgreSQL server using CLR triggers

    First thought would be the PERMISSION_SET, check this out on the subject: http://technet.microsoft.com/en-us/library/ms345101.aspx

    Ciao 😎

  • RE: How to update the fields having same Names and DOB?

    Window function solution, works on 2012 and later

    😎

    Create Table #Temp (ID int not null primary Key, Name varchar(25) not null, DOB datetime not null, Sex char(1), Race char(1), Height int,...

  • RE: What does >+ do?

    dj341 (4/9/2014)


    Eirikur Eiriksson (4/9/2014)


    :w00t: you are right, it simply negates the right hand side value 🙂

    (donk, operator precedence...)

    One of those days?

    No better way of putting it!:-D

  • RE: What does >+ do?

    GilaMonster (4/9/2014)


    Eirikur Eiriksson (4/9/2014)


    According to my findings (observed behavior) , using the minus "-" bypasses (for the lack of better word) the logical operator, select * from table where x...

  • RE: What does >+ do?

    dj341 (4/9/2014)


    Eirikur Eiriksson (4/9/2014)


    According to my findings (observed behavior) , using the minus "-" bypasses (for the lack of better word) the logical operator, select * from table where x...

  • RE: What does >+ do?

    According to my findings (observed behavior) , using the minus "-" bypasses (for the lack of better word) the logical operator, select * from table where x >- y brings...

  • RE: Practical Spatial Storage

    I have a sketch but cannot have it ready until the end of the month, is that OK?

Viewing 15 posts - 8,581 through 8,595 (of 8,760 total)