Viewing 15 posts - 16 through 30 (of 101 total)
Hi Goldie,
Do you have an index on UserID?
April 21, 2009 at 4:03 pm
You are right, it will convert automatically. I believe it will attempt to convert the varchar to an int.
The explicit conversion is useful as it will catch any bad...
April 7, 2009 at 6:05 pm
hi Goldie,
Before you posted that code I was trying to solve this another way - by concatenating all the comments and then searching for three blanks in a row
with cte(UserID,...
April 7, 2009 at 5:47 pm
You need to use the CAST function:
http://msdn.microsoft.com/en-us/library/ms187928(SQL.90).aspx
Something like:
select cast(users as int) from clientsDB.dbo.firsttable where cast(users as int) not in (select users from MarketingDB.dbo.secondtable)
Then to do an insert:
insert MarketingDB.dbo.secondtable...
April 7, 2009 at 5:35 pm
Hi. What is your current update statement?
Bevan
April 7, 2009 at 5:26 pm
Hi,
You need to fully qualify your table names when comparing accross databases. i.e. DatabaseName.owner.table
'owner' will probably be dbo.
Write a query similar to the following and see how you...
April 6, 2009 at 6:57 pm
The first list is sorted by nodeID - the second list starts with the parent (the one with no parentID listed) and then lists the child, then it's children (grandchildren)...
April 6, 2009 at 2:49 pm
Hi,
Use a recursive cte to build up your structure. The [sort] column is only used to store the relationships (and therefore the sorting).
create table #temp(NodeID int, ParentNodeID int null,...
April 5, 2009 at 11:05 pm
Hi Mh,
Is the logic wrong somewhere? If so, could you please explain further.
Or is it just that this query is not showing all 15 columns?
March 31, 2009 at 1:55 pm
Thanks Lowell for the table creates.
Mh is this what you are after? If this is not right you may need to provide further explanation.
with cte(loc, online_order, non_onlineOrder)
as (
select loc,...
March 30, 2009 at 6:04 pm
Hi,
Are you wanting to join table1 and table2 based on firstname and then join table2 and table3 based on ID? Try the code below and if that does not...
March 30, 2009 at 1:54 pm
David Webb (3/23/2009)
Ohio.Or maybe West Virginia.....
Clearly the best answer is New Zealand! 🙂
A first world country with solid infrastructure but relatively weaker dollar means you get more bang (code?)...
March 23, 2009 at 8:07 pm
Can you please provide statements for table create and insert of some example data?
Thanks
March 22, 2009 at 8:36 pm
I was just re-reading OP. If you have start and end date parameters you could just check if they are null...
-- Or you could use null as the...
March 19, 2009 at 8:23 pm
Hi,
Is this in a stored proc? If so you can add a parameter that will define what criteria to use. See below:
---- Table and sample data
drop table...
March 19, 2009 at 8:17 pm
Viewing 15 posts - 16 through 30 (of 101 total)