Forum Replies Created

Viewing 15 posts - 331 through 345 (of 1,082 total)

  • RE: can anyone see anything wrong with this query?

    ok could I get table definitions in the form a create statement so that I can run a complete script.

    thanks

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Special Character in select statement.

    Sorry I'm still not sure what you want to do???

    Could you give me an example.

    e.g

    Input : "STICHTING WERELDHULP-BELGIE

    OUTPUT : "STICHTING WERELDHULP-BELGIE ?

    or what ever it is that you want...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: can anyone see anything wrong with this query?

    I think you missing a bracket in your nested select .

    so try this:

    Declare @sql nvarchar(MAX)

    set @sql = ' SELECT x.SaleYear,...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Special Character in select statement.

    could you post a before and after example for us please?

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: can anyone see anything wrong with this query?

    could you do a PRINT Of @sql for us so we can see what the code is that is trying to be run.

    you might find that delimiting your strings...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: count rows with same id

    Why do you want a having clause?

    Is it because you only want to see rows with a duplicate id?

    A Having clause is basically like a where clause but it happens...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Converting a varchar datatype to hex in a query

    is this a one off import?

    If so then just add that one row seperatly

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: indexing

    are you sure?

    I still think it was because you used a select *

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: PATINDEX & Spliiting comma seperated values

    Sorry I have been away and I'm pretty busy today but will try and have a look later

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Converting a varchar datatype to hex in a query

    Are you using that in your access system you have one column that has

    '77 or 70 or 81' in it.

    And you result is:

    '77 or 70 or 81',"'77 or 70...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Converting a varchar datatype to hex in a query

    what error are you getting?

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Converting a varchar datatype to hex in a query

    shouldn't be that hard.

    Create the function

    then replace my solution example, by changing the table name and field name to your table name and your field name, BAMB you should get...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Converting a varchar datatype to hex in a query

    Ok here is my solution.

    I've created a function which uses some of the logic from the SQL function I posted earlier only it removes excess 0000 etc.

    CREATE FUNCTION dbo.fn_VarbinToHexStringChris

    (

    @int INT

    )

    --EXAMPLE

    --SELECT...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Converting a varchar datatype to hex in a query

    ah I see, cool well if I get an example from him, it might be possible to write the code to do the opposite:-)

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Can I make this any faster

    A tally table is a table that simply has a run of consecutive numbers for more information please read this article:

    http://www.sqlservercentral.com/articles/TSQL/62867/

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life

Viewing 15 posts - 331 through 345 (of 1,082 total)