Forum Replies Created

Viewing 15 posts - 1,486 through 1,500 (of 5,590 total)

  • RE: Creating loops within loops

    Kimberly,

    This should work. It does use a Tally table; see my previous post for how to build one, and how they can be used to get rid of loops.

    -- This...

  • RE: Convert to bigint

    When you convert that hex to varchar, I'm getting:

    ₮N!

    which doesn't convert to an int.

    Do you mean to be doing this?

    select CONVERT(VARCHAR(50), CONVERT(bigint,0x80074e21))

  • RE: Creating loops within loops

    Okay. Do you have a "Tally" table? The "Numbers" or "Tally" Table: What it is and how it replaces a loop.[/url]

  • RE: Creating loops within loops

    Just noticed that you posted in the SQL 7/2000 forum - can you verify what version of SQL you are working with? (I was looking at a solution that would...

  • RE: Are the posted questions getting worse?

    Brandie, if I was using 2008, I'd use the INSERT Values(), (), () thing. If 2005, most likely the union all, if the # of rows wasn't too high.

  • RE: Select query that matches data with column names

    ilker.cikrikcili (4/19/2011)


    Yes! That's it!!

    Thank you very much 🙂

    You're quite welcome.

    Did you read the referenced article, and do you understand everything that is going on? Please don't use it until...

  • RE: Inserting Incremented Alphabets into a column

    ChrisM@home (4/19/2011)


    LOL Wayne that was quick!

    Yep - not that hard. We're thinking along the same lines here.

  • RE: Select query that matches data with column names

    How's this?

    USE tempdb

    GO

    -- make a temp table

    IF object_id('tempdb..#test', 'U') IS NOT NULL DROP TABLE #test;

    CREATE TABLE #test (ID INT, name VARCHAR(20), surname VARCHAR(20), age TINYINT);

    -- populate it with some test...

  • RE: Inserting Incremented Alphabets into a column

    How's this?

    DECLARE @MyTable TABLE (VendorCode CHAR(2));

    INSERT INTO @MyTable

    SELECT 'AA' UNION ALL

    SELECT 'AB' UNION ALL

    SELECT 'AC';

    WITH cteMiniTally AS

    (

    -- get numbers from 1-26 (for the letters of the alphabet)

    SELECT TOP (26)

    ...

  • RE: Get time duration from one column...

    How's this?

    -- specify dateformat for different areas:

    SET DATEFORMAT DMY;

    -- See how you start off by actually creating a table and then

    -- inserting the data into it? Your doing this...

  • RE: Creating loops within loops

    kmaker (4/18/2011)


    Wayne,

    Thank you very much for the info on how to post.

    Unfortunately I cannot get the table definitions of the SCADA (supervisory control and data acquisition) data so I...

  • RE: Creating loops within loops

    If you post your complete working code, (along with table definitions and sample data, as per the first link in my signature), we'll show you a method that will blow...

  • RE: need help with stored proc passing string for where in (@myparm)

    See my signature for the latest version of the Delimited Split function.

    DECLARE @SaleCategory VARCHAR(500),

    @SaleDate datetime;

    SET @SaleCategory = 'Outer Wear,Mens,Foot Wear,N/A';

    SET @SaleDate =...

  • RE: 2 Sessions im considering for PASS

    I'd be pretty intrigued to go see the SSIS custom components - it would depend on what is competing with you in that timeslot. Not so sure about the "Just...

  • RE: Date as INT - having trouble with comparison :(

    Phineas Gage (4/18/2011)


    There are 3 non-clustered indexes on that table, 2 of which use the date column.

    By "use the date column"... is the date column the first column in these...

Viewing 15 posts - 1,486 through 1,500 (of 5,590 total)