Viewing 15 posts - 9,691 through 9,705 (of 13,460 total)
here is a link to one that i built after a few posts on the subject here on SSC; it's got all the code to insert all the known holidays...
Lowell
April 14, 2010 at 10:14 am
oops reread it and there are multiples;
this seems to get you 98% there:
--now get the ID's using a tally table
declare
@pre varchar(10),
@post varchar(10),
@pr int,
@po int,
@st int
set @pre = 'TBM'
set @post...
Lowell
April 14, 2010 at 10:05 am
if the TBM number is always 6 characters and it always starts the string, you could simply take the LEFT(col,6) of the string
SELECT LEFT(String,6) from #Test
if it could exist anywhere...
Lowell
April 14, 2010 at 9:59 am
i have this saved in my snippets to get the next business day:
this assumes you have a Calendar table with some specific columns, since business days are also dependant on...
Lowell
April 14, 2010 at 9:46 am
truncating a table frees up space WITHIN the database, so more data can be added without expanding the database. the db assumes that you made room for more data; if...
Lowell
April 14, 2010 at 9:38 am
it seems like you want a 1 to N solution, not a running total(since you explicitly gave the 1-3-5 example of non consecutive values)
for any actual solution, i would end...
Lowell
April 14, 2010 at 9:06 am
if you are trying to find the consecutive records from start to some row that equals the amount, this solution below using a "running total" works;
if you are after some...
Lowell
April 14, 2010 at 8:03 am
Well at least it's not me;
they can make a views for the oh so heavily queried sys.routes and sys.schemas but not a sys.functions;
seems more like an oversight rather than a...
Lowell
April 14, 2010 at 7:47 am
I agree with Howard;
I'll bet it's parameter sniffing with out of date statistics also, and the recompile of the procedure because you made some text changes(but no functional change:...
Lowell
April 13, 2010 at 11:13 am
what have you tried so far? because this is your first post and your example has the word "student" in it, we want to make sure you learn the...
Lowell
April 13, 2010 at 5:07 am
you need to install the oracle client on the Server that is hosting the SQL Server instance.
you'll have to copy/set up the TNS names files just as you would any...
Lowell
April 13, 2010 at 4:46 am
anitha also watch your data types...if the column is CHAR or NCHAR, it is padded on the right with spaces to the full size of the column definition: insert 'anitha'...
Lowell
April 12, 2010 at 6:07 pm
i thought it was one of those implicit conversion things;
when your WHERE is evaluated here:
id = '';
the id column is implicitly converted to varchar....since every int can convert to a...
Lowell
April 12, 2010 at 2:22 pm
this is probably the easiest way: using the LIKE statement and the pseudo regular expression:
select zipcode,* from YourTable where zipcode like '%[^0-9]%'
that will find anything with characters outside of the...
Lowell
April 12, 2010 at 11:57 am
the issue is datatypes; integers/number datatypes do not have preceeeding zeros;
i think your table dbo.ReportFinal.MedRecNO is defined as an integer;
you said it's defined as an nvarchar, but that's the only...
Lowell
April 12, 2010 at 10:36 am
Viewing 15 posts - 9,691 through 9,705 (of 13,460 total)