Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8758859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T14:39:28+00:00 2026-06-13T14:39:28+00:00

I have a mistake in this sql statement and I don’t know why: SELECT

  • 0

I have a mistake in this sql statement and I don’t know why:

SELECT t1.id_servidor_virtual as id_servidor_virtual,
    t1.nombre_servidor as nombre_servidor, 
    t1.plantilla as plantilla, 
    (SELECT tt1.descripcion
        FROM sku_precios tt1
        WHERE tt1.id_sku_precio = 'VM --') as c_sv,
    t1.sv_pvp as c_sv_pvp,
    t1.sv_pvp_dist as c_sv_pvp_dist,
    (SELECT tt1.descripcion
        FROM sku_precios tt1
        WHERE tt1.id_sku_precio = 'VCPU --') as c_cpu,
    t1.cpu_cant as c_cpu_cant,
    t1.cpu_pvp as c_cpu_pvp,
    t1.cpu_pvp_dist as c_cpu_pvp_dist,
    (SELECT tt1.descripcion
        FROM sku_precios tt1
        WHERE tt1.id_sku_precio = 'RAM --') as c_ram,
    t1.ram_cant as c_ram_cant,
    t1.ram_pvp as c_ram_pvp,
    t1.ram_pvp_dist as c_ram_pvp_dist,
    aletras(t1.ram_cant) as c_ram_unidad,
    (SELECT tt1.descripcion
        FROM sku_precios tt1 
        WHERE tt1.id_sku_precio = 'HDSTD --') as c_hdd,
    t1.hdd_cant as c_hdd_cant,
    t1.hdd_pvp as c_hdd_pvp,
    t1.hdd_pvp_dist as c_hdd_pvp_dist,
    aletras(t1.hdd_cant) as c_hdd_unidad,
    (SELECT tt1.descripcion
        FROM sku_precios tt1
        WHERE tt1.id_sku_precio = 'IPP --') as c_ip,
==> (t1.ip_pvpt1.ip_polled_pvpt1.ip_custom_pvp) as c_ip_pvp, 
    (t1.ip_pvp_distt1.ip_polled_pvp_distt1.ip_custom_pvp_dist) as c_ip_pvp_dist, 
    t1.id_servidor_virtual as parent_id, 
    (SELECT COUNT(t2.id_servicio_adicional) 
        FROM servicios_adicionales t2 
        WHERE t2.id_servidor_virtual = t1.id_servidor_virtual) as cant_sa,
    DATE_FORMAT(t2.f_inicio_contrato, '%d-%m-%Y') as f_inicio_contrato, 
    DATE_FORMAT(t2.f_fin_contrato, '%d-%m-%Y') as f_fin_contrato, 
    (SELECT tt2.n_pedido 
        FROM servidores_virtuales tt1 
        INNER JOIN pedidos tt2 ON tt2.id_pedido = tt1.id_pedido 
        WHERE tt1.id_servidor_virtual = t2.id_pedido_actualizado) as n_pedido_actualizado, 
    (SELECT t3.descuento 
        FROM albaranes t3 
        WHERE t3.id_pedido = t1.id_pedido 
        AND t3.id_cuenta_emisora = 2) as descuento 
FROM servidores_virtuales t1 
LEFT OUTER JOIN pedidos t2 ON t2.id_pedido = t1.id_pedido 
WHERE t1.id_pedido = 230;

The mistake is:

Err] 1064 – You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘.ip_custom_pvp) as c_ip_pvp, ‘ at line 32

Line 32 is marked with ==>.

Could you help me?. Thanks so much

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T14:39:30+00:00Added an answer on June 13, 2026 at 2:39 pm
    t1.ip_pvpt1.ip_polled_pvpt1.ip_custom_pvp
    

    Are you sure you shouldn’t have some other characters in there, like a + or - sign for example?

    It seems to me that that’s three separate columns:

    t1.ip_pvp   t1.ip_polled_pvp   t1.ip_custom_pvp
    

    which should be joined in some other manner than just removing the white space between them 🙂

    That’s not the only occurrence by the way, just the first one I picked up on. There’s one on the following line as well.

    The reason MySQL is complaining is that you’re apparently breaking the schema.object naming standard by having two . characters in the fill object name (hence three rather than two levels).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this simple SQL statement: select Expr1.value - Expr2.value FROM (SELECT Expr1 =
I have a problem with a SQL statement: Using this select a.id as ID,
I have the following SQL statement sample: SELECT DISTINCT [CommentNdx] ,[CommentsText] ,[DateTimeAdded] FROM [dbo].[CommentTable]
I'm trying to find this mistake: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL
I have an sql statement that I posted on this site, and I applied
I have an sql query that requires repeating the same SELECT statement a number
i would like to translate this request in LINQ to SQL: SELECT * from
I have this functional Linq-to-Sql statement. public IEnumerable<int> GetChildIds(IEnumerable<int> selectedParentIds) { using (var context
I started to learn PHP and have to find a mistake (maybe in this
This is for certain a newbie mistake, I have googled for plenty of hours

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.