Forum Replies Created

Viewing 15 posts - 856 through 870 (of 1,082 total)

  • RE: Using SET ISOLATION LEVEL

    HI All,

    I was wondering if anyone had found anything on this?

    I've been looking but can't see to find anything to read up 🙁

    I'm sure I read somewhere a year ago...

    ----------------------------------------------
    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: Why Hexidecimal

    Thanks Michael E 🙂

    Most my mates same the same thing, I'm working on it 😀

    Michael J, please could you give me an example?

    thanks

    Chris

    ----------------------------------------------
    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: Why Hexidecimal

    HEre are two examples of the fun side of it:

    SELECT REPLACE(0x5768617473206e6f742066756e2061626f75742074686973,'Check This','Out')

    print replace(0x2027202729,0x20,'print replace(0x2027202729,0x20,')

    😎

    ----------------------------------------------
    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: Getting extra quote marks when Importing data with a single quote mark to identify inches

    Sorry it should have read

    SUBSTRING(COl3,2,LEN(Col3)-2)

    ----------------------------------------------
    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: Getting extra quote marks when Importing data with a single quote mark to identify inches

    Couldn't you just update the column after the data insert by saying

    UPDATE Mytable

    SET Col3 = SUBSTRING(Col3 ,2,LEN(@Col3 )-2)

    This will remove the outer two quotes provided they are always...

    ----------------------------------------------
    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: Bad Microsoft DB Schema Example

    WEll you need to remember that you shouldn't use SELECT * so you should return the book columns in a food query

    ----------------------------------------------
    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: Bad Microsoft DB Schema Example

    Other thing is to maybe create a ProductsBook and ProductsFood table?

    What do people think of this?

    ----------------------------------------------
    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: Making it pivot

    True about the pivot, but even though the thread is under 2005 I think the guy is using 2000

    ----------------------------------------------
    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: Get date of last Sunday of every month

    Good call Jeff,

    This may not work if the DateFirst changes

    SELECT DATEADD(DAY,1-DATEPART(weekday,dateadd(ms,-3,DATEADD(mm, DATEDIFF(m,0,@dte)+1, 0))),dateadd(ms,-3,DATEADD(mm, DATEDIFF(m,0,@dte)+1, 0)))

    still working on that part.

    Thanks

    Chris

    ----------------------------------------------
    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: Using Criteria in Queries from Values in a Form

    Well you need to change the syntax for the name of the textbox and the form that it belongs to ...

    The reason it works is because [TextBoxValue] = "" will...

    ----------------------------------------------
    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: Nested If inside a Loop

    UPDATE [T]

    SET [T].HomePhone = .Phone

    FROM EeTemp_T [T]

    INNER JOIN EeUpdates_T

    ON .[EE_ID] = [T].[EE_ID]

    WHERE .Phone NOT IN (select HomePhone from [EeTemp_T])

    DELETE

    FROM [EeUpdates_T]

    WHERE .Phone IN (select HomePhone from [EeTemp_T])

    YOu could...

    ----------------------------------------------
    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: Nested If inside a Loop

    mmm

    OK what is the Temp table for?

    You should beable to simply run an update statement followed by the Delete statement with not loops or if statements on all the rows...

    ----------------------------------------------
    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: Nested If inside a Loop

    HI there,

    Please could you post the query that you have so far, so that we can point you in the right direction

    thanks

    Chris

    ----------------------------------------------
    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: Dividing count(*) by DateDiff always equals 1

    Have you tried converting your int's to decimals?

    ----------------------------------------------
    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: Using Criteria in Queries from Values in a Form

    HI,

    Have you tried something like this in your query

    SELECT *

    FROM Mytable

    WHERE Col1 = [TextboxValue] or [TextboxValue]= ''

    That way if the text box is empty then everything comes back

    ----------------------------------------------
    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 - 856 through 870 (of 1,082 total)