Viewing 15 posts - 6,391 through 6,405 (of 10,144 total)
mario.balatellii (12/7/2011)
I will be hard coding the headings and I want the respective data for the row under that heading.
No problem. Don't forget to shape your sample data so that...
December 7, 2011 at 9:36 am
In grown-up SQL Server folks often use
RAISERROR('Almost instant screen print',10,1) WITH NOWAIT;
rather than PRINT.
December 7, 2011 at 8:46 am
mario.balatellii (12/7/2011)
I want the heading to be like
TYPE BANKNAME ...
December 7, 2011 at 8:36 am
Rixxe (12/7/2011)
ChrisM@Work (12/7/2011)
If so, is the data you're...
December 7, 2011 at 7:15 am
Ah, an overrun, from the bit which records the position in the substring of '='.
SELECT
[No.],
MsgType,
MsgTimeStamp,
split.Item,
Pos,
en.[Entity code],
en.[Entity name],
Attribute
FROM #SampleTable s
CROSS APPLY dbo.DelimitedSplit8k(s.[Description],'') split
CROSS APPLY (
SELECT...
December 7, 2011 at 6:40 am
It's possibly worse than that:
56=DEB 34=293131=0018000 47992N1 297=5
There are clearly defined entity-attribute pairs at the beginning and the end, but what's in between? Even by eye it's not possible to...
December 7, 2011 at 5:59 am
Could be tab. Try copy-paste into a function:
SELECT ASCII('')
SELECT CHAR(7)
Copy and paste the space between the quotes in this - SELECT ASCII('') and run it in SSMS.
December 7, 2011 at 5:41 am
You're welcome.
The function looks up to date. Where are we with this? Did you change the sample data to uniquely identify each row?
December 7, 2011 at 5:26 am
It's fine for now Mario. There's a slightly newer, faster version, I'll find a link. Or the code.
December 7, 2011 at 5:04 am
Many thanks, Mario, that's just about perfect. Here's your table integrated into that code I posted earlier. First thing you will notice is that the data requires partitioning - there's...
December 7, 2011 at 4:48 am
Let me ask another question. This looks like a single step in the creation of a complex cross-tabbed report. Is this the case?
If so, is the data you're inserting into...
December 7, 2011 at 4:37 am
mario.balatellii (12/7/2011)
Hope this information is enough for you chris? thnks
Have you tried running the sample table code?
December 7, 2011 at 4:30 am
INSERT...SELECT will insert rows from the output of the SELECT. If there are no rows returned by the SELECT, then no rows will be inserted.
In your case, you want...
December 7, 2011 at 4:23 am
Heh Mario, take a look at the second paragraph in the forum etiquette article I pointed out to you! You might then read the third 😛
December 7, 2011 at 3:48 am
Hi Paul
Have a read of Gails blog post on the subject of non-existence here[/url]. Armed with your new knowledge you will choose the best option.
December 7, 2011 at 3:39 am
Viewing 15 posts - 6,391 through 6,405 (of 10,144 total)