Viewing 15 posts - 7,636 through 7,650 (of 14,953 total)
Alvin Ramard (11/25/2009)
CirquedeSQLeil (11/25/2009)
Is that a 73-way tie for first place on a daily basis?
I can't say Jason. I only have ten fingers so these bigs numbers can be...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
November 25, 2009 at 9:17 am
I generally use bit for that. Would use char(1) if it were to be Y/N.
I got used to using bit fields because my first app used Access as the...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
November 25, 2009 at 7:14 am
To the two new people here, welcome aboard. Always remember, the most important rule of all, for this thread, is "it depends". We're sticklers for that one. ...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
November 25, 2009 at 7:11 am
The -1 is what gets rid of the comma. Leave it in.
Glad you got what you need, and thank you for the compliment. 🙂
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
November 25, 2009 at 7:08 am
Lowell (11/24/2009)
if it was a valid SELECT statement,...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
November 25, 2009 at 7:06 am
Add:
Where YourColumnName like '%,%'
to the end of the query.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
November 24, 2009 at 2:50 pm
select left(@String, charindex(',', @String)-1) as Col1,
right(@String, len(@String)-charindex(',', @String)) as Col2;
Replace "@String" with your column name, and add "From " and your table name. Replace "Col1" and "Col2" with your...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
November 24, 2009 at 2:38 pm
Someone went WAY overboard on that split.
If it'll always be just one comma, try something like this:
declare @String varchar(100);
select @String = 'first,last';
select left(@String, charindex(',', @String)-1),
right(@String, len(@String)-charindex(',', @String));
Charindex finds the position...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
November 24, 2009 at 2:23 pm
RegEx might help, but what happens if there's a table with a column named "ExecutionDate", for the execution date of a trade or sale? Will you block all queries...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
November 24, 2009 at 11:41 am
Steve Jones - Editor (11/24/2009)
I've seen similar things in many places. I have had to implement the "change...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
November 24, 2009 at 11:19 am
Set up a read-only copy of the database and make it so it can only connect to that.
Permissions would be the best way to manage this, but if you really...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
November 24, 2009 at 11:04 am
One of the dumbest things I've ever had to handle was being handed a laptop when I was hired, with a spreadsheet of all the sa passwords for all the...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
November 24, 2009 at 8:46 am
Jeff, have you been to Atlanta recently?
Just saw this on Google news.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
November 24, 2009 at 7:56 am
Why remove them? Just include that in the query.
If you really need to remove it, you'll need to convert to varchar(max), and use the Replace function, then convert back...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
November 24, 2009 at 7:31 am
First, you need to fix your XML. It has things like a start-tag of "ID" and an end-tag of "/tradeID", and "name" with "/measure". That's not correct XML,...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
November 23, 2009 at 1:31 pm
Viewing 15 posts - 7,636 through 7,650 (of 14,953 total)