Viewing 15 posts - 526 through 540 (of 541 total)
Try creating the table and then inserting into it; this should allow you to select the values into a variable and into the table at the same time.
But...
July 8, 2003 at 1:22 pm
Try creating the table and then inserting into it; this should allow you to select the values into a variable and into the table at the same time.
But...
July 8, 2003 at 1:22 pm
You can do some cool things directly in tSQL using "WAITFOR" with "DELAY" or "TIME".
Example below...
use Northwind--for this example
IF Object_ID('tempdb..##NewCategories') is not null drop table ##NewCategories
Create Table ##NewCategories (CategoryID int,...
July 2, 2003 at 4:39 pm
What datatype is the column "plant_per"? That would be the first thing I'd look at with a 6.5 to 2000 conversion.
Look at BOL for an example of problems like...
July 1, 2003 at 11:25 am
I've found that using the query hint (Nolock) helps, especially when selecting against a table locked by a transaction.
July 1, 2003 at 11:07 am
Does it have to be incremental or just unique? If just unique, the selecting with a column newid() works beautifully.
June 27, 2003 at 12:29 pm
Actually, to produce the results:
6 4
6 2
3 7
2 3
You actually want to sort by:
64
62
37
23
so:
Select * from Table
order by cast(col1 as varchar) + cast(col2 as varchar) Desc
June 27, 2003 at 11:50 am
You can use a case statement and set the value back to itself if it doesn't fit certain criteria. An example below...
/*--------------------------------
Updates #Test1 with values from #Test2 only when...
June 23, 2003 at 12:55 pm
I don't know if this will work, but try to qualify the column poprj_UID as po_projects.poprj_UID.
June 23, 2003 at 12:36 pm
This may be a dumb question, but is DTS an option for you?
Using a text file as the source and an table as the destination can be extremely fast. ...
June 23, 2003 at 12:27 pm
That's a good question. Check out BOL keyword "constraints, PRIMARY KEY" for some info on it. The gist of the matter seems to be that Primary Key's are...
June 20, 2003 at 5:32 pm
If you're not working with a datetime field you'll have to cast as datetime first.
varchar output: Convert(varchar,cast(dteShipped as datetime),101)
datetime output: cast(Convert(varchar,cast(dteShipped as datetime),101) as datetime)
June 19, 2003 at 2:44 pm
Actually, it's Truncate TABLE <Table Name>, and that's definitely the way to do it. If you have any foreign keys that reference that table you'll have to drop them...
June 19, 2003 at 2:36 pm
jraha's query forces the index to be used, but you may want to rethink that composite index.
For example, tShortTerm has a one to many relationship with tLongTerm, but...
June 19, 2003 at 12:19 pm
Viewing 15 posts - 526 through 540 (of 541 total)