Hi guys, it's been years since I last wrote here. Site has changed and there are so many forums! Browsing the site brings up good memories and the...
Consider inserting only your PK into the temp table then joining it with your table to retrieve the 10 rows you need. Also, if you are using SQL...
and if column can be null you should use UPDATE table SET col1 = ISNULL(col1, '') + 'A'
Not sure I understand you well. Can you show us some code?
Good luck Chris!
Here is another way to do it use pubs exec pubs..sp_msforeachtable @command1 = 'select ''??'' table_name, count(*) Number_of_rows from ?'
You can also use the syntax SELECT ... FROM my_table WHERE 'Optic' IN (column_1, column_2... Here is an example of how you can get the column...
Thanks Twan & Satya. It's good to be back. <img src='/community/emoticons/emotion-1.gif' alt=':-)' /> and sorry guys for not being around lately.
yes, there is. create an identity on that table.
bambolarosa@hotmail.com Thanks a million.
Maybe he means SELECT Count(*), Category FROM Book GROUP BY Category
what I meant is to create a job that calls a stored procedure that deletes/moves the rows where datediff(year, date_field, getdate() ) >= 1 then...
I think it is a good idea. I would certainly use it. I would add to the sites Satya had mentioned http://www.sqlsecurity.com/DesktopDefault.aspx...
<img src='/community/emoticons/emotion-1.gif' alt=':-)' /><br />in this case you can still use the script satya gave you, just add an insert into...
Use your query as a subquery and pull out the min date. this example has only one table but it would be the same with more select min(x.pubdate)...
There are 2 virtual tables that are called INSERTED and DELETED. when you insert a row to table A the table INSERTED will have the same structure of...
You can use IsNumeric function. INSERT INTO databaseB..table SELECT .... FROM databaseA..table WHERE ISNUMERIC(my_column) = 1
Take the insert statement you are sending to the database, and try to run it in QA (Query Analyzer). If there is an error you would see it there....
the problem is in this line set @jmonth = DATENAME(MONTH(ISSUEDATE) + ', ' + LTRIM(STR(YEAR(ISSUEDATE))) I assume this is what you are looking for...
Create an index on the column you order by.
Separate names with a comma.