Viewing 15 posts - 3,181 through 3,195 (of 14,953 total)
When I was coming from a VB background into SQL, I was used to the Now() function to get the current date and time, and didn't yet know about GetDate()....
October 6, 2011 at 2:22 pm
It was unclear because Commit only decrements the trancount by 1 till that hits 0, and then it actually commits stuff. Rollback takes you all the way to the...
October 6, 2011 at 2:19 pm
while (1=1)
begin
set rowcount 1
select @temp1= A ,
@temp2= B from #test
if @@rowcount=0
begin
That @@rowcount will never equal zero.
Try this, you'll see why:
DECLARE @A CHAR(1) ;
CREATE TABLE #T (C1 CHAR(1)) ;
INSERT INTO...
October 6, 2011 at 2:15 pm
If you want the word "NULL" instead of a null value, then yes, you'll need to do that for each column.
October 6, 2011 at 1:47 pm
faruk.arshad (10/6/2011)
yes i know tat ..but i want to use loop becoz want clear looping concept in SQL jst pretty mch confuse in it..
if object_id(N'tempdb..#T') is not null drop...
October 6, 2011 at 1:46 pm
LutzM (10/6/2011)
...As a side note: if you're using nested transactions, be aware that a COMMIT or ROLLBACK only affect the outermost transaction (see BOL, Nesting Transactions for details).
Not quite. ...
October 6, 2011 at 1:41 pm
If the professor who assigned this is looking for a loop, then use a cursor for it. That's a "loop" in T-SQL.
If it isn't homework, skip the loop and...
October 6, 2011 at 1:37 pm
You could use Coalesce or IsNull in your query.
October 6, 2011 at 1:33 pm
Lynn Pettis (10/6/2011)
GilaMonster (10/6/2011)
Lynn Pettis (10/6/2011)
Didn't GETDATE() use to (or still get) the same error?Yes, in SQL 2000.
Then the code Jack ran into my be a vestige left over when...
October 6, 2011 at 1:32 pm
Sean Lange (10/6/2011)
Jack Corbett (10/6/2011)
Never really listened to...
October 6, 2011 at 12:52 pm
Grant Fritchey (10/6/2011)
Stefan Krzywicki (10/6/2011)
GilaMonster (10/6/2011)
Ninja's_RGR'us (10/6/2011)
Grant Fritchey (10/6/2011)
Steve Jones - SSC Editor (10/6/2011)
A sad day, and a reminder...
October 6, 2011 at 12:48 pm
It will really depend on your table structure, index structure, and what type of data you are storing.
If, for example, you have a clustered index with a fill factor of...
October 6, 2011 at 11:31 am
Try this, see if it performs well enough on your actual data volume.
SELECT *,
DATEDIFF(DAY, OrderDate,
...
October 6, 2011 at 11:26 am
I haven't used Google docs much, but it sounds like it might be a way to get started.
How would you migrate from docs to wiki?
October 6, 2011 at 9:35 am
Building and administering Dev Edition on a VM isn't just for advanced features. It's how I learned the simple basics, too.
Very useful technique.
I also keep a database called ProofOfConcept...
October 4, 2011 at 3:47 am
Viewing 15 posts - 3,181 through 3,195 (of 14,953 total)