Forum: MS SQL Apr 3rd, 2009 |
| Replies: 2 Views: 790 Stored procedures need to be created using the CREATE PROCEDURE statement and then executed (F5 or the green play button in the toolbar). They are compiled and stored in the database itself. If you... |
Forum: MS SQL May 9th, 2008 |
| Replies: 6 Views: 1,482 It's late and I'm a little blurry. But from what I can see in your query I think this: tDocumentsA.user_id = tUsers.contact_id should be: tDocumentsA.user_id = tUsers.id (the same for all document... |
Forum: MS SQL Mar 13th, 2008 |
| Replies: 7 Views: 17,494 Oops we posted at same time. When restoring you will have to tweek some options: 1. the name for the database (cos it doesn't exist on the new server yet) just type it in the drop down box. And 2.... |
Forum: MS SQL Mar 13th, 2008 |
| Replies: 7 Views: 17,494 Right click the database -> Tasks -> Back Up...
More info here (quite a way down it looks at SSMSEE in depth) Just CTRL + F for 'Backup'.
... |
Forum: MS SQL Mar 13th, 2008 |
| Replies: 7 Views: 17,494 Do a complete backup, copy the file to the other server and restore it there.
Or you can detach the database, copy the .mdf and .ldf files zip them up and copy them over to the new server, unzipp... |
Forum: MS SQL Mar 12th, 2008 |
| Replies: 10 Views: 1,437 MS Access !! yuck !! You didn't say you were using Access, and as this is a MS SQL Forum I used TSQL.
Ok just for you I have recreated everything in Access and tweaked the SQL. Basically removed... |
Forum: MS SQL Mar 12th, 2008 |
| Replies: 2 Views: 980 That works. Also there is TSQL's ISNULL function.
SELECT
ISNULL(FirstColumn, '') + ' ' + ISNULL(SecondColumn, '') AS ResultColumn
FROM
mytable |
Forum: MS SQL Mar 12th, 2008 |
| Replies: 10 Views: 1,437 Excellent. Please mark thread solved :) |
Forum: MS SQL Mar 12th, 2008 |
| Replies: 3 Views: 1,798 Fee Fi Fo Fum I smell the blood of a Tsql Cursor, be he slow or be he slower, I'll grind his bones with my set theory mower.
Sorry I'm on a personal crusade against cursors :)
I offer my own... |
Forum: MS SQL Mar 12th, 2008 |
| Replies: 10 Views: 1,437 Hmm re-reading your post that may not be quite what you want, you want lowest quote regardless of vendor I think.
select
q.[ID],
q.item,
v.[name],
mq.minprice,
v.phone#,
v.fax# ... |
Forum: MS SQL Mar 12th, 2008 |
| Replies: 10 Views: 1,437 Firstly just join the quote_tb to the vendor_tb. That gives the vendor details for ALL quotes.
Then use GROUP BY (to merge up all the repeating colums (ID, item, name, phone#, fax#) and the... |
Forum: MS SQL Apr 3rd, 2007 |
| Replies: 4 Views: 6,181 update <tablename> set MobileNo = replace(MobileNo, '-', '')
You don't mention the name of the table so replace <tablename> with the name of your table (minus the chevrons obviously)
I... |
Forum: MS SQL Sep 21st, 2006 |
| Replies: 4 Views: 8,804 Dim userid As Int32 = Me.classname.UserID
Dim strSQLD As String = "Insert into table1 (userid) values (" & Me.classname.UserID & ")"
You need to concatenate the value into the string, I beleive... |