Viewing 15 posts - 1,486 through 1,500 (of 5,590 total)
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...
April 19, 2011 at 2:56 pm
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))
April 19, 2011 at 1:46 pm
Okay. Do you have a "Tally" table? The "Numbers" or "Tally" Table: What it is and how it replaces a loop.[/url]
April 19, 2011 at 1:38 pm
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...
April 19, 2011 at 1:18 pm
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.
April 19, 2011 at 1:14 pm
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...
April 19, 2011 at 9:24 am
ChrisM@home (4/19/2011)
LOL Wayne that was quick!
Yep - not that hard. We're thinking along the same lines here.
April 19, 2011 at 9:03 am
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...
April 19, 2011 at 8:54 am
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)
...
April 19, 2011 at 8:25 am
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...
April 19, 2011 at 7:34 am
kmaker (4/18/2011)
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...
April 18, 2011 at 8:25 pm
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...
April 18, 2011 at 4:17 pm
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 =...
April 18, 2011 at 4:00 pm
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...
April 18, 2011 at 3:51 pm
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...
April 18, 2011 at 3:46 pm
Viewing 15 posts - 1,486 through 1,500 (of 5,590 total)