Forum: MS SQL 19 Days Ago |
| Replies: 2 Views: 557 you can import the data, in management studio right click on your destination database and click import, then set up a mysql connection to your other database
depending upon how mysql specific the... |
Forum: MS SQL Apr 7th, 2009 |
| Replies: 2 Views: 1,377 there are other ways you could do this, but here's one
select
CAST(Reference AS INT) as REFERENCE
from tablename |
Forum: MS SQL Apr 7th, 2009 |
| Replies: 3 Views: 1,028 you could also use varchar(max)
here's a link that will explain it
http://www.teratrax.com/articles/varchar_max.html
and also a reference for it (check out #2)... |
Forum: MS SQL Apr 7th, 2009 |
| Replies: 3 Views: 1,028 you should be able to use a nvarchar(max) |
Forum: MS SQL Apr 3rd, 2009 |
| Replies: 19 Views: 1,314 Awesome, you happen to know what the issue was with the one we were working with? |
Forum: MS SQL Apr 2nd, 2009 |
| Replies: 19 Views: 1,314 the stop table is only used in the subquery and can't be referenced outside of it
i don't get why, but it looks like the isdrop =1 is not just joining on those records
try adding this piece in... |
Forum: MS SQL Apr 2nd, 2009 |
| Replies: 19 Views: 1,314 its not late, only 5, just got a few left before work is done though, there is some data in here that isn't jiving
this will do a partial update, but might help determine what is going on
add... |
Forum: MS SQL Apr 2nd, 2009 |
| Replies: 19 Views: 1,314 so close, just something in there i'm just not catching right now, one last try for the evening, cross our fingers
UPDATE jobhistory
SET modifieddt =
(SELECT top 1... |
Forum: MS SQL Apr 2nd, 2009 |
| Replies: 19 Views: 1,314 but all stop.stopcompletiondatetime are not null? |
Forum: MS SQL Apr 2nd, 2009 |
| Replies: 19 Views: 1,314 hmmmm,
run this
select jobhistory.histjobid, stop.stopcompletiondatetime
from jobhistory
inner join jobxstop
on jobxstop.jobid = jobhistory.histjobid
inner join stop |
Forum: MS SQL Apr 2nd, 2009 |
| Replies: 19 Views: 1,314 sorry long day already, i didn't have the join on the original table, lets go back to your query the first time with that one line removed
UPDATE jobhistory
SET modifieddt =... |
Forum: MS SQL Apr 2nd, 2009 |
| Replies: 19 Views: 1,314 i can't completely tell the structure, but i believe this will work, just make sure you do a backup first!!!
UPDATE jobhistory
SET modifieddt =
(SELECT stop.stopcompletiondatetime
from... |
Forum: MS SQL Apr 2nd, 2009 |
| Replies: 3 Views: 491 a procedure is not directly associated with a table, it could be a single, multiple, or no tables involved
in the section that says do your work here, lets say we are doing a single insert
... |
Forum: MS SQL Apr 2nd, 2009 |
| Replies: 1 Views: 587 Is it in the maintenance plan or a schedule task to do so?
My advice would be to create a maintenance plan to create the backup, and a scheduled task to compress it and ftp it
I don't... |
Forum: MS SQL Apr 2nd, 2009 |
| Replies: 19 Views: 1,314 you have this in here
INNER
JOIN stop
ON stop.stopcompletiondatetime = jobhistory.modifieddt
which will not work, because stopcompletiondatetime does not equal your modifieddt |
Forum: MS SQL Apr 2nd, 2009 |
| Replies: 2 Views: 1,659 Add an additional parameter for your id, this will return the newly inserted record's id, otherwise if it failed an exception will be thrown and you don't need to check for its existence
... |
Forum: MS SQL Apr 2nd, 2009 |
| Replies: 3 Views: 491 in management studio you can use object explorer, open your database (expand), go to programmability right click on stored procedures and click new stored procedure
you can also do it manually by... |
Forum: MS SQL Mar 26th, 2009 |
| Replies: 1 Views: 983 you can just use a '+' (plus sign) if they are two string fields
i added a space in between the fields as well
select db1.dbo.customer.technote + ' ' + db2.dbo.customers.notes as FULL_NOTE... |
Forum: MS SQL Mar 17th, 2009 |
| Replies: 2 Views: 695 select p.ID,
(SELECT SUM(i.IncomeAmount) from Income i where i.PersonId = p.ID) AS INCOME_AMOUNT,
(SELECT SUM(o.OutcomeAmount) from Outcome o where o.PersonId = p.ID) AS OUTCOME_AMOUNT
from Person... |
Forum: MS SQL Mar 17th, 2009 |
| Replies: 2 Views: 546 select top 3 *
from tableName
order by col3 desc |
Forum: MS SQL Mar 16th, 2009 |
| Replies: 3 Views: 566 At peak times our currently active users would be around 500 or so and have ran into no limitations yet with the vms. |
Forum: MS SQL Mar 11th, 2009 |
| Replies: 3 Views: 2,071 you posted this in the mssql forum, are you using oracle then?
if so, post in there |
Forum: MS SQL Mar 11th, 2009 |
| Replies: 3 Views: 2,071 i wouldn't suggest adding an additional column necessarily, but creating a view, that way, your duration will always be in sync with the columns
select USER_ID, START_TIME, END_TIME,... |
Forum: MS SQL Mar 11th, 2009 |
| Replies: 4 Views: 1,694 Is the query taking that long to execute anyway?
I would suggest the bottom one, the less tables that are involved generally the more speed achieved, if performance is really that big of an issue... |
Forum: MS SQL Mar 11th, 2009 |
| Replies: 4 Views: 1,694 i'm not quite sure what you are trying to do here, but there are 2 things
first you are referencing R3 outside of its scope, second you have a where instead of an and, here is my shot at what i... |
Forum: MS SQL Mar 10th, 2009 |
| Replies: 6 Views: 904 Ok, just wanted to make sure we aren't chasing a ghost
Rather than just adding the parameters with a name and value, try to add them with a name and type
SqlParameter param1 = new... |
Forum: MS SQL Mar 10th, 2009 |
| Replies: 6 Views: 904 For starters lets start off with syntax:
Did you see this line?
SqlParameter("@ResultTime", ddRTime.Text.Trim()));
your parameter is named @RTime |
Forum: MS SQL Mar 10th, 2009 |
| Replies: 6 Views: 904 Are you sure you set the column's data type to datetime? It sounds like you are using varchar |
Forum: MS SQL Mar 9th, 2009 |
| Replies: 3 Views: 566 This may not be of any assistance, but just in case. I have move pretty much all sql server's to virtual pc with no problem and think its a much better solution than having a separate dedicated... |
Forum: MS SQL Mar 8th, 2009 |
| Replies: 10 Views: 1,740 Ahhh sorry, forgot you only needed sql server
here's a link that should help
http://www.nigelrivett.net/SQLTsql/RemoveNonNumericCharacters.html
here it is with modification
CREATE FUNCTION... |
Forum: MS SQL Mar 7th, 2009 |
| Replies: 10 Views: 1,740 here is my idea then
select translate('123AB45',
'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789',
'ABCDEFGHIJKLMNOPQRSTUVWXYZ') from dual;
i don't necessarily know the context... |
Forum: MS SQL Mar 5th, 2009 |
| Replies: 10 Views: 1,740 would adding a trigger that will format the field to only be characters upon inserts and updates be sufficient? |
Forum: MS SQL Mar 4th, 2009 |
| Replies: 4 Views: 665 Ahhh a hosted database. Not sure if you can in the configuration options for that. I would suggest to contact godaddy or do it at the table level if need be.
... |
Forum: MS SQL Mar 3rd, 2009 |
| Replies: 4 Views: 665 Yes, here is a good link to set the collation for many collation codes
http://www.serverintellect.com/support/sqlserver/change-database-collation.aspx |
Forum: MS SQL Dec 2nd, 2008 |
| Replies: 1 Views: 531 could be a few things, first things first
have you applied the latest service pack? |
Forum: MS SQL Dec 1st, 2008 |
| Replies: 3 Views: 549 as you said before, you can import this into sql express with no problems correct?
you can do something like this
select SYSTEM_CODE, DATE_FIELD
where DATE_FIELD >= convert(datetime,... |
Forum: MS SQL Dec 1st, 2008 |
| Replies: 3 Views: 549 lol another tip, post what you need in this forum in your next post
but, lets start here, what are you having trouble with? |
Forum: MS SQL Dec 1st, 2008 |
| Replies: 1 Views: 443 it depends what you are doing at time of insert to the master table, if you are using a stored procedure you can use this
insert into mastertable .....
select @@identity
same as your... |
Forum: MS SQL Dec 1st, 2008 |
| Replies: 5 Views: 821 what about a distinct
select distinct cust_no
its hard to see where the data is coming from here, if you are wanting the balance only from customer.balance |
Forum: MS SQL Dec 1st, 2008 |
| Replies: 5 Views: 821 you need to add a group by
GROUP BY cust_no,...... |