You are here: Re: Need to declare multiple values « MsSQL Server « IT news, forums, messages
Re: Need to declare multiple values

Posted by --CELKO-- on 10/30/06 21:06

1) start using the standard CAST() and not the proprietary CONVERT().

2) There is no such thing as a gernal purpose magical universal "id",
so your DDL that you did not post will make no sense as a data model.
The names are all wrong. A table cannot have a type -- that is an
attribute. The DDL is where the table is created, not a kind of table.


3) A SELECT statement has only one WHERE clause, not the OR-ed chain
you showed. What you wanted was something like this, assuming that
AdminAdvertisers are logically different from mere Advertisers.

SELECT <col list>
FROM AdminAdvertisers
WHERE foobar_type IN (1,2,3,4);

4) Syntax error converting the varchar value '1,3,4,5' to a column of
data type int. <<

Of course! Look at the string; it is full of commas so it cannot be
parsed as an INTEGER.

Your problem is that you do not understand that a column is always a
scalar value. You have no idea how to create a data model and a
newsgroup is not going to give you that kind of training.

See if you can get help from some who knows SQL and data modeling for a
few months. Your mental model is wrong.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация