Viewing 15 posts - 13,711 through 13,725 (of 13,848 total)
Maybe. To get rid of any duplicate records that are being returned by your query, try using
select distinct
instead of just select.
September 16, 2004 at 6:18 pm
Glad I could help.
I imagine you're after a SQL script that will recreate the database (minus the data). The way that I would do this is in Enterprise Manager....
September 16, 2004 at 6:14 pm
Just checking - are the zip codes defined as text or numeric within Excel? If they are numeric, that is your problem (regardless of how they are displayed in...
September 15, 2004 at 8:47 pm
It's not pretty, but see whether this helps:
declare @sql varchar(400)
set @sql = 'select * from ?.information_schema.tables where table_name = ''[tablename]'''
exec sp_msforeachdb @sql
--replace [tablename] with the name of the table you...
September 15, 2004 at 8:40 pm
The original poster asked for a way of retrieving just the date part of a datetime field. Your method returns exactly the opposite - the time part - in a...
September 14, 2004 at 8:37 pm
Hi Ed
We need to get to the bottom of why so many records are being returned first, I think. This is almost certainly because of the fact that you have...
September 14, 2004 at 6:57 pm
Should work. Is state_id a text field? Then you'd need
state_id = '101'
Or does it need to be trimmed?
trim(state_id) = '101'
Aha ... just seen your amended post - good.
September 10, 2004 at 12:50 am
Something like this?
select t.transporter_name, a.state_id
from transporters t left outer join association a on
t.transporter_id = a.transporter_id
where state_id = 101 or state_id is null
September 10, 2004 at 12:36 am
Perhaps you could run Profiler to check the SQL Server side of the equation? Otherwise, I'm running out of ideas.
Good luck
Phil
September 9, 2004 at 11:20 pm
So do you know at what stage in the process that the conversion is failing for these records?
I'm thinking it could be
a) Something in the logic of the conversion program...
September 9, 2004 at 11:06 pm
So you've got everything you can find on your server set to US format and you're still getting d/m/y date format problems from somewhere?
September 9, 2004 at 10:42 pm
So are you trying to make your SQL Server 'pretend' it is American? Don't know whether this will work, but you might try changing the control panel/regional options on...
September 9, 2004 at 10:16 pm
Hi Ed
If, for a particular record in 'organization', a related record does not exist in the 'totals' table, all of the fields retrieved from the totals table will be NULL.
So...
September 8, 2004 at 6:03 pm
In general, for readability ...
'On' should be used for joins between tables:
select * from tablea a inner join tableb b
on a.id = b.id
etc
'Where' should be used to filter the results...
September 8, 2004 at 12:33 am
Viewing 15 posts - 13,711 through 13,725 (of 13,848 total)